Part Number Hot Search : 
FQP6N40C SDHP5KM 26102 X3211 IRG4BC LU331 M37225M6 74F164
Product Description
Full Text Search
 

To Download SST89V516RD Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  ?2013 silicon storage technology, inc. ds25093b 02/13 data sheet www.microchip.com features ? 8-bit 8051-compatible microcontroller (mcu) with embedded superflash memory ? fully software compatible ? development toolset compatible ? pin-for-pin package compatible ? sst89e516rd2 operation ? 0 to 40 mhz at 5v ? SST89V516RD2 operation ? 0 to 33 mhz at 3v ? 1 kbyte internal ram ? dual block superflash eeprom ? 64 kbyte primary block + 8 kbyte secondary block (128-byte sector size for both blocks) ? individual block security lock with softlock ? concurrent operation during in-application programming (iap) ? memory overlay for interrupt support during iap ? support external address range up to 64 kbyte of program and data memory ? three high-current drive ports (16 ma each) ? three 16-bit timers/counters ? full-duplex, enhanced uart ? framing error detection ? automatic address recognition ? ten interrupt sources at 4 priority levels ? four external interrupt inputs ? programmable watchdog timer (wdt) ? programmable counter array (pca) ? four 8-bit i/o ports (32 i/o pins) and one 4-bit port ? second dptr register ? low emi mode (inhibit ale) ? spi serial interface ? standard 12 clocks per cycle, the device has an option to double the speed to 6 clocks per cycle. ? ttl- and cmos-compatible logic levels ? brown-out detection ? low power modes ? power-down mode with external interrupt wake-up ? idle mode ? temperature ranges: ? commercial (0c to +70c) ? industrial (-40c to +85c) ? packages available ? 40-contact wqfn (port 4 feature not available) ? 44-lead plcc ? 40-pin pdip (port 4 feature not available) ? 44-lead tqfp ? all non-pb (lead-free) devices are rohs compliant flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD the sst89e516rdx and SST89V516RDx are members of the flashflex family of 8-bit microcontroller products design ed and manufactured with sst?s patented and proprietary superflash cmos semic onductor process technology. the split- gate cell design and thick-oxide tunneling in jector offer significant cost and reli- ability benefits for sst?s customers. the de vices use the 8051 instruct ion set and are pin-for-pin compatible with standard 8051 microcontroller devices.
?2013 silicon storage technology, inc. ds25093b 02/13 2 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet product description the sst89e516rdx and SST89V516RDx are members of the flashflex family of 8-bit microcon- troller products designed and manufactured with sst?s patented and proprietary superflash cmos semiconductor process technology. the split-gate cell design and thick-oxide tunneling injector offer significant cost and reliability bene fits for sst?s customers. the devices use the 8051 instruction set and are pin-for-pin compatible with standard 8051 microcontroller devices. the devices come with 72 kbyte of on-chip flash eeprom program memory which is partitioned into 2 independent program memory blocks. the primary block 0 occupies 64 kbyte of internal program memory space and the secondary block 1 occupies 8 kbyte of internal program memory space. the 8-kbyte secondary block can be mapped to the lowest location of the 64 kbyte address space; it can also be hidden from the program counter and used as an independent eeprom-like data mem- ory. in addition to the 72 kbyte of eeprom program memory on-chip and 1024 x8 bits of on-chip ram, the devices can address up to 64 kbyte of external program memory and up to 64 kbyte of external ram. the flash memory blocks can be programmed via a standard 87c5x otp eprom programmer fitted with a special adapter and the firmware for sst?s devices. during power-on reset, the devices can be configured as either a slave to an external host for source code storage or a master to an external host for an in-application programming (iap) operation. the devices are designed to be programmed in- system and in-application on the printed circuit board for maximu m flexibility. the de vices are pre-pro- grammed with an example of the bootstrap loader in the memory, demonstrating the initial user pro- gram code loading or subsequent user code updating via the iap operation. the sample bootstrap loader is available for the user?s reference and convenience only; sst does not guarantee its function- ality or usefulness. chip-erase or block-erase operations will erase the pre-programmed sample code.
?2013 silicon storage technology, inc. ds25093b 02/13 3 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet functional blocks figure 1: functional block diagram 10 interrupts superflash eeprom primary block 64k x8 secondary block 8k x8 i/o i/o i/o i/o watchdog timer interrupt control 8051 cpu core ram 1k x8 security lock i/o port 0 i/o port 1 i/o port 2 i/o port 3 enhanced uart spi timer 0 (16-bit) timer 1 (16-bit) timer 2 (16-bit) 88 8 8 1273 b1.0 pca i/o i/o port 4 4 flash control unit 8 oscillator alu, acc, b-register, instruction register, program counter, timing and control
?2013 silicon storage technology, inc. ds25093b 02/13 4 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet pin assignments figure 2: pin assignments for 40-contact wqfn 1273 40-wqfn qi p1.0 (cex2 / mosi) p1.5 (cex3 / miso) p1.6 (cex4 / sck) p1.7 rst (rxd) p3.0 (txd) p3.1 (int0#) p3.2 (int1#) p3.3 (t0) p3.4 (t1) p3.5 (wr#) p3.6 (rd#) p3.7 xtal2 xtal1 v ss (a8) p2.0 (a9) p2.1 (a10) p2.2 (a11) p2.3 (a12) p2.4 1 40 p0.4 (ad4) p0.5 (ad5) p0.6 (ad6) p0.7 (ad7) ea# ale/prog# psen# p2.7 (a15) p2.6 (a14) p2.5 (a13) p1.4 (cex1 / ss#) p1.3 (cex0) p1.2 (eci) p1.1 (t2 ex) p1.0 (t2) v dd p0.0 (ad0) p0.1 (ad1) p0.2 (ad2) p0.3 (ad3) top view (contacts facing down)
?2013 silicon storage technology, inc. ds25093b 02/13 5 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet figure 3: pin assignments for 40-pin pdip 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 (t2) p1.0 (t2 ex) p1.1 (eci) p1.2 (cex0) p1.3 (cex1 / ss#) p1.4 (cex2 / mosi) p1.5 (cex3 / miso) p1.6 (cex4 / sck) p1.7 rst (rxd) p3.0 (txd) p3.1 (int0#) p3.2 (int1#) p3.3 (t0) p3.4 (t1) p3.5 (wr#) p3.6 (rd#) p3.7 xtal2 xtal1 v ss 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 v dd p0.0 (ad0) p0.1 (ad1) p0.2 (ad2) p0.3 (ad3) p0.4 (ad4) p0.5 (ad5) p0.6 (ad6) p0.7 (ad7) ea# ale/prog# psen# p2.7 (a15) p2.6 (a14) p2.5 (a13) p2.4 (a12) p2.3 (a11) p2.2 (a10) p2.1 (a9) p2.0 (a8) 40-pin pdip to p v i e w 1273 40-pdip pi p2.0
?2013 silicon storage technology, inc. ds25093b 02/13 6 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet figure 4: pin assignments for 44-lead tqfp (cex2 / mosi) p1.5 (cex3 / miso) p1.6 (cex4 / sck) p1.7 rst (rxd) p3.0 int2#/p4.3 (txd) p3.1 (int0#) p3.2 (int1#) p3.3 (t0) p3.4 (t1) p3.5 p0.4 (ad4) p0.5 (ad5) p0.6 (ad6) p0.7 (ad7) ea# p4.1 ale/prog# psen# p2.7 (a15) p2.6 (a14) p2.5 (a13) p1.4 (ss# / cex1) p1.3 (cex0) p1.2 (eci) p1.1 (t2 ex) p1.0 (t2) p4.2/int3# v dd p0.0 (ad0) p0.1 (ad1) p0.2 (ad2) p0.3 (ad3) (wr#) p3.6 (rd#) p3.7 xtal2 xtal1 v ss p4.0 (a8) p2.0 (a9) p2.1 (a10) p2.2 (a11) p2.3 (a12) p2.4 1273 44-tqfp tqj p3.0 1 2 3 4 5 6 7 8 9 10 11 33 32 31 30 29 28 27 26 25 24 23 44 43 42 41 40 39 38 37 36 35 34 12 13 14 15 16 17 18 19 20 21 22 44-lead tqfp top view
?2013 silicon storage technology, inc. ds25093b 02/13 7 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet figure 5: pin assignments for 44-lead plcc 39 38 37 36 35 34 33 32 31 30 29 7 8 9 10 11 12 13 14 15 16 17 (cex2 / mosi) p1.5 (cex3 / miso) p1.6 (cex4 / sck) p1.7 rst (rxd) p3.0 int2#/p4.3 (txd) p3.1 (int0#) p3.2 (int1#) p3.3 (t0) p3.4 (t1) p3.5 p0.4 (ad4) p0.5 (ad5) p0.6 (ad6) p0.7 (ad7) ea# p4.1 ale/prog# psen# p2.7 (a15) p2.6 (a14) p2.5 (a13) 6 5 4 3 2 1 44 43 42 41 40 18 19 20 21 22 23 24 25 26 27 28 p1.4 (ss# / cex1) p1.3 (cex0) p1.2 (eci) p1.1 (t2 ex) p1.0 (t2) p4.2/int3# v dd p0.0 (ad0) p0.1 (ad1) p0.2 (ad2) p0.3 (ad3) (wr#) p3.6 (rd#) p3.7 xtal2 xtal1 v ss p4.0 (a8) p2.0 (a9) p2.1 (a10) p2.2 (a11) p2.3 (a12) p2.4 44-lead plcc top view 1273 44-plcc nj p4.0
?2013 silicon storage technology, inc. ds25093b 02/13 8 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet pin descriptions table 1: pin descriptions (1 of 3) symbol type 1 name and functions p0[7:0] i/o port 0: port 0 is an 8-bit open drain bi-directional i/o port. as an output port each pin can sink several ls ttl inputs. port 0 pins float that have ?1?s written to them, and in this state can be used as high-impedance inputs. port 0 is also the multi- plexed low-order address and data bus during accesses to external memory. in this application, it uses strong internal pull-ups when transitioning to v oh. port 0 also receives the code bytes during the external host mode programming, and outputs the code bytes during the external host mode verification. external pull- ups are required during program verification. p1[7:0] i/o with inter- nal pull-ups port 1: port 1 is an 8-bit bi-directional i/o port with internal pull-ups. the port 1 output buffers can drive ls ttl inputs. port 1 pins are pulled high by the internal pull-ups when ?1?s are written to them and can be used as inputs in this state. as inputs, port 1 pins that are externally pu lled low will source current because of the internal pull-ups. p1[5, 6, 7] have high current drive of 16 ma. port 1 also receives the low-order address bytes during the external host mode programming and ver- ification. p1[0] i/o t2: external count input to timer/counte r 2 or clock-out from timer/counter 2 p1[1] i t2ex: timer/counter 2 capture/reload trigger and direction control p1[2] i eci: pca timer/counter external input: this signal is the external clock input for the pca timer/counter. p1[3] i/o cex0: compare/capture module external i/o each compare/capture module connects to a port 1 pin for external i/o. when not used by the pca, this pin can handle standard i/o. p1[4] i/o ss#: master input or slave output for spi. or cex1: compare/capture module external i/o p1[5] i/o mosi: master output line, slave input line for spi or cex2: compare/capture module external i/o p1[6] i/o miso: master input line, slave output line for spi or cex3: compare/capture module external i/o p1[7] i/o sck: master clock output, slave clock input line for spi or cex4: compare/capture module external i/o p2[7:0] i/o with inter- nal pull-up port 2: port 2 is an 8-bit bi-directional i/o port with internal pull-ups. port 2 pins are pulled high by the internal pull-ups when ?1?s are written to them and can be used as inputs in this state. as inputs, port 2 pins that are externally pulled low will source current because of the internal pull-ups. port 2 sends the high-order address byte during fetches from external program memory and during accesses to external data memory that use 16-bit address (movx@dptr). in this applica- tion, it uses strong internal pull-ups when transitioning to v oh . port 2 also receives some control signals and high-order address bits during the external host mode programming and verification.
?2013 silicon storage technology, inc. ds25093b 02/13 9 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet p3[7:0] i/o with inter- nal pull-up port 3: port 3 is an 8-bit bidirectional i/o port with internal pull-ups. the port 3 output buffers can drive ls ttl inputs. port 3 pins are pulled high by the internal pull-ups when ?1?s are written to them and can be used as inputs in this state. as inputs, port 3 pins that are externally pu lled low will source current because of the internal pull-ups. port 3 also receives some control signals and a partial of high- order address bits during the external host mode programming and verification. p3[0] i rxd: universal asynchronous receiver/t ransmitter (uart) - receive input p3[1] o txd: uart - transmit output p3[2] i int0#: external interrupt 0 input p3[3] i int1#: external interrupt 1 input p3[4] i t0: external count input to timer/counter 0 p3[5] i t1: external count input to timer/counter 1 p3[6] o wr#: external data memory write strobe p3[7] o rd#: external data memory read strobe psen# i/o program store enable: psen# is the read strobe to external program store. when the device is executing from internal program memory, psen# is inactive (v oh ). when the device is executing code from external program memory, psen# is activated twice each machine cycl e, except when access to external data memory while one psen# activation is skipp ed in each machine cycle. a forced high-to-low input transition on the psen# pin while the rs t input is contin- ually held high for more than ten machine cycles will ca use the device to enter external host mode for programming. rst i reset: while the oscillator is running, a high logic state on this pin for two machine cycles will reset the device. after a reset, if the psen# pin is driven by a high-to-low input transition while the rst input pin is held high, the device will enter the external host mode, otherwise the device will enter the normal opera- tion mode. ea# i external access enable: ea# must be driven to v il in order to enable the device to fetch code from the external program memory. ea# must be driven to v ih for internal program execution. however, security lock level 4 will disable ea#, and program execution is only possible from internal program memory. the ea# pin can tolerate a high voltage 2 of 12v. ale/ prog# i/o address latch enable: ale is the output signal for latching the low byte of the address during an access to external memory. this pin is also the programming pulse input (prog#) for flash programming. normally the ale 3 is emitted at a constant rate of 1/6 the crystal frequency 4 and can be used for external timing and clocking. one ale pulse is skipped during each access to external data memory. however, if ao is set to 1, ale is disabled. p4[3:0] 5 i/o with inter- nal pull-ups port 4: port 4 is an 4-bit bi-directional i/o port with internal pull-ups. the port 4 output buffers can drive ls ttl inputs. port 4 pins are pulled high by the internal pull-ups when ?1?s are written to them and can be used as inputs in this state. as inputs, port 4 pins that are externally pulled low will source current because of the internal pull-ups. p4[0] i/o bit 0 of port 4 p4[1] i/o bit 1 of port 4 p4[2] / int3# i/o bit 2 of port 4 / int3# external interrupt 3 input table 1: pin descriptions (continued) (2 of 3) symbol type 1 name and functions
?2013 silicon storage technology, inc. ds25093b 02/13 10 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet p4[3] / int2# i/o bit 3 of port 4 / int2# external interrupt 2 input xtal1 i crystal 1: input to the inverting oscillator amplifier and input to the internal clock generator circuits. xtal2 o crystal 2: output from the inverting oscillator amplifier v dd i power supply v ss i ground t0-0.0 25093 1. i = input; o = output 2. it is not necessary to receive a 12v prog ramming supply voltage during flash programming. 3.ale loading issue: when ale pin experiences higher l oading (>30pf) during the reset, t he mcu may accidentally enter into modes other than normal working mode. the so lution is to add a pull-up resistor of 3-50 k to v dd , e.g. for ale pin. 4. for 6 clock mode, ale is emi tted at 1/3 of crystal frequency. 5. port 4 is not present on the pdip and wqfn packages. table 1: pin descriptions (continued) (3 of 3) symbol type 1 name and functions
?2013 silicon storage technology, inc. ds25093b 02/13 11 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet memory organization the device has separate address spaces for program and data memory. program flash memory there are two internal flash memory blocks in the device. the primary flash memory block (block 0) has 64 kbyte. the secondary flash memory block (block 1) has 8 kbyte. since the total program address space is limited to 64 kbyte, the sfcf[1:0] bit are used to control program bank selection. please refer to figure 6 for the program memory configuration. program bank selection is described in the next section. the 64k x8 primary superflash block is organized as 512 sectors, each sector consists of 128 bytes. the 8k x8 secondary superflash block is organized as 64 sectors, each sector consists also of 128 bytes. for both blocks, the 7 least significant program address bits select the byte within the sector. the remainder of the program address bits select the sector within the block. figure 6: program memory organization 1273 f01.0 external 64 kbyte ea# = 0 ffffh 0000h 64 kbyte block 0 ea# = 1 sfcf[1:0] = 01, 10, 11 ffffh 0000h 56 kbyte block 0 8 kbyte block 1 ea# = 1 sfcf[1:0] = 00 ffffh 2000h 0000h 1fffh
?2013 silicon storage technology, inc. ds25093b 02/13 12 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet program memory block switching the program memory block switching feature of the device allows either block 1 or the lowest 8 kbyte of block 0 to be used for the lowest 8 kbyte of the program address space. sfcf[1:0] controls program memory block switching. reset configuration of pr ogram memory block switching program memory block switching is in itialized after reset according to the state of the start-up config- uration bit sc0. the sc0 bit is programmed via an external host mode command or an iap mode com- mand. see table 14. once out of reset, the sfcf[0] bit can be changed dynamically by the program for desired effects. changing sfcf[0] will no t change the sc0 bit. caution must be taken when dyna mically changing the sfcf[0] bit. since this will cause different physical memory to be mapped to the logical prog ram address space. the user must avoid executing block switching instructions within the address range 0000h to 1fffh. data ram memory the data ram has 1024 bytes of internal memory. the ram can be addressed up to 64kb for external data memory. table 2: sfcf values for program memory block switching sfcf[1:0] program memo ry block switching 01, 10, 11 block 1 is not visible to the program counter (pc). block 1 is reachable only via in-applic ation programming from 0000h - 1fffh. 00 block 1 is overlaid onto the low 8k of the prog ram address space; occupying address locations 0000h - 1fffh. when the pc falls within 0000h - 1fffh, the instruct ion will be fetched from block 1 instead of block 0. outside of 0000h - 1fffh, block 0 is used. locati ons 0000h - 1fffh of block 0 are reachable through in-application programming. t0-0.0 25093 table 3: sfcf values under different reset conditions sc0 1 1. p = programmed (bit logic state = 0), u = unprogrammed (bit logic state = 1) state of sfcf[1:0] after: power-on or external reset wdt reset or brown-out reset software reset u (1) 00 (default) x0 10 p (0) 01 x1 11 t0-0.0 25093
?2013 silicon storage technology, inc. ds25093b 02/13 13 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet expanded data ram addressing the sst89e/v516rdx have the capabilit y of 1 kbyte ram. see figure 7. the device has four sections of internal data memory: 1. the lower 128 bytes of ram (00h to 7fh) are directly and indirectly addressable. 2. the higher 128 bytes of ram (80h to ffh) are indirectly addressable. 3. the special function registers (80h to ffh) are directly addressable only. 4. the expanded ram of 768 bytes (00h to 2 ffh) is indirectly addressable by the move external instruction (movx) and clearing the extram bit. (see ?auxiliary register (auxr)? in section , ?special function registers?) since the upper 128 bytes occupy the same address es as the sfrs, the ram must be accessed indi- rectly. the ram and sfrs space are physically separate even though they have the same addresses. when instructions access addresses in the upper 128 bytes (above 7fh), the mcu determines whether to access the sfrs or ram by the type of instruction given. if it is indirect, then ram is accessed. if it is direct, then an sfr is accessed. see the examples below. indirect access: mov@r0, #data; r0 contains 90h register r0 points to 90h which is located in the upper address range. data in ?#data? is written to ram location 90h rather than port 1. direct access: mov90h, #data; write data to p1 data in ?#data? is written to port 1. instructions that write directly to the address write to the sfrs. to access the expanded ram, the extram bit must be cleared and movx instructions must be used. the extra 768 bytes of memory is physically locate d on the chip and logically occupies the first 768 bytes of external memory (addresses 000h to 2ffh). when extram = 0, the expanded ram is indirectly addressed using the movx instruction in combi- nation with any of the registers r0, r1 of the selected bank or dptr. accessing the expanded ram does not affect ports p0, p3.6 (wr#), p3.7 (rd#), or p2. with extram = 0, the expanded ram can be accessed as in the following example. expanded ram access (indirect addressing only): movx@dptr, a; dptr contains 0a0h dptr points to 0a0h and data in ?a? is written to address 0a0h of the expanded ram rather than external memory. access to external memory higher than 2ffh using the movx instruction will access external memory (0300h to ffffh) and will perform in the same way as the standard 8051, with p0 and p2 as data/address bus, and p3.6 and p3.7 as write and read timing signals. when extram = 1, movx @ri and movx @dptr w ill be similar to the standard 8051. using movx @ri provides an 8-bit address with multiplexed data on port 0. other output port pins can be used to output hi gher order address bits. this provides external paging capabilities. using movx @dptr generates a 16-bit address. this allows exte rnal addressing up the 64k. port 2 provides the
?2013 silicon storage technology, inc. ds25093b 02/13 14 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet high-order eight address bits (dph), and port 0 multiplexes the low order eight address bits (dpl) with data. both movx @ri and movx @dptr generates the necessary read and write signals (p3.6 - wr# and p3.7 - rd#) for external memory use. table 4 shows external data memory rd#, wr# oper- ation with extram bit. the stack pointer (sp) can be located anywhere within the 256 bytes of internal ram (lower 128 bytes and upper 128 bytes). the stack pointer may not be located in any part of the expanded ram. table 4: external data memory rd#, wr# with extram bit movx @dptr, a or movx a, @dptr movx @ri, a or movx a, @ri auxr addr < 0300h addr >= 0300h addr = any extram = 0 rd# / wr# not asserted rd# / wr# asserted rd# / wr# not asserted 1 1. access limited to eram address within 0 to 0ffh; cannot access 100h to 02ffh. extram = 1 rd# / wr# asserted rd# / wr# asserted rd# / wr# asserted t0-0.0 25093
?2013 silicon storage technology, inc. ds25093b 02/13 15 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet figure 7: internal and external data memory structure 000h 2ffh 00h ffh upper 128 bytes internal ram lower 128 bytes internal ram (indirect & direct addressing) (indirect addressing) (direct addressing) special function registers (sfrs) 80h ffh ffffh 000h external data memory 2ffh 0000h external data memory extram = 0 extram = 1 expanded ram 0300h (indirect addressing) ffffh (indirect addressing) (indirect addressing) 80h 7fh 1273 f02.0 expanded ram 768 bytes
?2013 silicon storage technology, inc. ds25093b 02/13 16 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet dual data pointers the device has two 16-bit data pointers. the dptr select (dps) bit in auxr1 determines which of the two data pointers is accessed. when dps= 0, dptr0 is selected; when dps=1, dptr1 is selected. quickly switching between the two data pointers can be accomplished by a single inc instruction on auxr1. (see figure 8) figure 8: dual data pointer organization special function registers most of the unique features of the flashflex microcontroller family are controlled by bits in special function registers (sfrs) located in the sfr memory map shown in table 5. individual descriptions of each sfr are provided and reset values indicated in tables 6 to 10. table 5: flashflex sfr memory map 8 bytes f8h ip1 1 1. bit addressable sfrs ch ccap0h ccap1h ccap2h ccap3h ccap4h ffh f0h b 1 ip1h f7h e8h iea 1 cl ccap0l ccap1l ccap2l ccap3l ccap4l efh e0h acc 1 e7h d8h ccon 1 cmod ccapm0 ccapm1 ccapm2 ccapm3 ccapm4 dfh d0h psw 1 spcr d7h c8h t2con 1 t2mod rcap2l rcap2h tl2 th2 cfh c0h wdtc 1 c7h b8h ip 1 saden bfh b0h p3 1 sfcf sfcm sfal sfah sfdt sfst iph b7h a8h ie 1 saddr spsr xicon afh a0h p2 1 auxr1 p4 a7h 98h scon 1 sbuf 9fh 90h p1 1 97h 88h tcon 1 tmod tl0 tl1 th0 th1 auxr 8fh 80h p0 1 sp dpl dph wdtd spdr pcon 87h t0-0.0 25093 dpl 82h dps = 0 dptr0 dps = 1 dptr1 external data memory dps 1273 f03.0 dph 83h dptr0 dptr1 auxr1 / bit0
?2013 silicon storage technology, inc. ds25093b 02/13 17 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet table 6: cpu related sfrs symbol description direct address bit address, symbol, or alternative port function reset value msb lsb acc 1 accumulator e0h acc[7:0] 00h b 1 b register f0h b[7:0] 00h psw 1 program sta- tus word d0h cy ac f0 rs 1 rs0 ov f1 p 00h sp stack pointer 81h sp[7:0] 07h dpl data pointer low 82h dpl[7:0] 00h dph data pointer high 83h dph[7:0] 00h ie 1 interrupt enable a8h ea ec et2 es et1 ex1 et0 ex0 00h iea 1 interrupt enable a e8h - - - - ebo - - - xxxx0xxx b ip 1 interrupt prior- ity reg b8h - ppc pt2 ps pt1 px1 pt0 px0 x0000000 b iph interrupt prior- ity reg high b7h - ppch pt2 h ps h pt1h px1 h pt0h px0 h x0000000 b ip1 1 interrupt prior- ity reg a f8h - - - - pbo px3 px2 - xxxx0xxx b ip1h interrupt prior- ity reg a high f7h - - - - pbo h px3 h px2h - xxxx0xxx b pcon power control 87h smod 1 smod 0 bof po f gf1 gf0 pd idl 00010000 b auxr auxiliary reg 8eh - - - - - - extra m ao xxxxxxx0 0b auxr1 auxiliary reg 1 a2h - - - - gf2 0 - dps xxxx00x0 b xicon external interrupt con- trol aeh - ex3 ie3 it3 0 ex2 ie2 it2 00h t0-0.0 25093 1. bit addressable sfrs
?2013 silicon storage technology, inc. ds25093b 02/13 18 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet table 7: flash memory programming sfrs symbol description direct address bit address, symbol, or alternative port function reset value msb lsb sfcf superflash configuration b1h - iape n -- - - sw r bse l x0xxxx00 b sfcm superflash command b2h fie fcm[6:0] 00h sfal superflash address low b3h superflash low order byte address register - a 7 to a 0 (sfal) 00h sfah superflash address high b4h superflash high order byte address register - a 15 to a 8 (sfah) 00h sfdt superflash data b5h superflash data register 00h sfst superflash status b6h sb1 _i sb2_ i sb3 _i - edc_i flash_bu sy - - 000x00xx b t0-0.0 25093 table 8: watchdog timer sfrs symbol description direct address bit address, symbol, or alternative port function reset value msb lsb wdtc 1 1. bit addressable sfrs watchdog timer control c0h - - - wdout wdre wdts wdt swdt xxx00x00 b wdtd watchdog timer data/reload 85h watchdog timer data/reload 00h t0-0.0 25093
?2013 silicon storage technology, inc. ds25093b 02/13 19 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet table 9: timer/counters sfrs symbol description direct address bit address, symbol, or alternative port function reset value msb lsb tmod timer/counter mode control 89h timer 1 timer 0 00h gat e c/t# m1 m0 gate c/ t# m1 m0 tcon 1 timer/counter control 88h tf1 tr1 tf0 tr0 ie1 it1 ie0 it0 00h th0 timer 0 msb 8ch th0[7:0] 00h tl0 timer 0 lsb 8ah tl0[7:0] 00h th1 timer 1 msb 8dh th1[7:0] 00h tl1 timer 1 lsb 8bh tl1[7:0] 00h t2con 1 timer / coun- ter 2 control c8h tf2 exf 2 rcl k tcl k exen 2 tr2 c/ t2# cp/ rl2# 00h t2mod timer2 mode control c9h---- - -t2o e dcen xxxxxx00 b th2 timer 2 msb cdh th2[7:0] 00h tl2 timer 2 lsb cch tl2[7:0] 00h rcap2 h timer 2 capture msb cbh rcap2h[7:0] 00h rcap2 l timer 2 capture lsb cah rcap2l[7:0] 00h t0-0.0 25093 1. bit addressable sfrs
?2013 silicon storage technology, inc. ds25093b 02/13 20 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet table 10: interface sfrs symbol description direct address bit address, symbol, or alternative port function reset value msb lsb sbuf serial data buf- fer 99h sbuf[7:0] indetermi- nate scon 1 serial port con- trol 98h sm0/ fe sm1 sm2 ren tb8 rb8 ti ri 00h sadd r slave address a9h saddr[7:0] 00h sade n slave address mask b9h saden[7:0] 00h spcr spi control register d5h spie spe dor d mst r cpo l cph a spr 1 spr 0 04h spsr spi status register aah spif wco l 00h spdr spi data regis- ter 86h spdr[7:0] 00h p0 1 port 0 80h p0[7:0] ffh p1 1 port 1 90h - - - - - - t2e x t2 ffh p2 1 port 2 a0h p2[7:0] ffh p3 1 port 3 b0h rd# wr# t1 t0 int1 # int0 # txd rxd ffh p4 2 port 4 a5h 1 1 1 1 p4.3 p4.2 p4.1 p4.0 ffh t0-0.0 25093 1. bit addressable sfrs 2. p4 is similar to p1 and p3 ports
?2013 silicon storage technology, inc. ds25093b 02/13 21 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet table 11: pca sfrs symbol description direct address bit address, symbol, or alternative port function reset value msb lsb ch cl pca timer/coun- ter f9h e9h ch[7:0] cl[7:0] 00h 00h ccon 1 pca timer/coun- ter control register d8h cf cr - ccf4 ccf 3 ccf 2 ccf 1 ccf0 00x0000 0b cmod pca timer/coun- ter mode register d9h cid l wdte - - - cps 1 cps 0 ecf 00xxx000 b ccap0 h pca module 0 compare/cap- ture registers fah ccap0h[7:0] 00h ccap0 l eah ccap0l[7:0] 00h ccap1 h pca module 1 compare/cap- ture registers fbh ccap1h[7:0] 00h ccap1 l ebh ccap1l[7:0] 00h ccap2 h pca module 2 compare/cap- ture registers fch ccap2h[7:0] 00h ccap2 l ech ccap2l[7:0] 00h ccap3 h pca module 3 compare/cap- ture registers fdh ccap3h[7:0] 00h ccap3 l edh ccap3l[7:0] 00h ccap4 h pca module 4 compare/cap- ture registers feh ccap4h[7:0] 00h ccap4 l eeh ccap4l[7:0] 00h ccapm 0 pca compare/cap- ture module mode registers dah - ecom 0 capp 0 capn 0 mat 0 tog 0 pwm 0 eccf 0 x000000 0b ccapm 1 dbh - ecom 1 capp 1 capn 1 mat 1 tog 1 pwm 1 eccf 1 x000000 0b ccapm 2 dch - ecom 2 capp 2 capn 2 ma t 2 to g 2 pwm 2 eccf 2 x000000 0b ccapm 3 ddh - ecom 3 capp 3 capn 3 mat 3 tog 3 pwm 3 eccf 3 x000000 0b ccapm 4 deh - ecom 4 capp 4 capn 4 mat 4 tog 4 pwm 4 eccf 4 x000000 0b t0-0.0 25093 1. bit addressable sfrs
?2013 silicon storage technology, inc. ds25093b 02/13 22 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet symbol function iapen enable iap operation 0: iap commands are disabled 1: iap commands are enabled swr software reset see section , ?software reset? bsel program memory block switching bit see figure 6 and table 3 symbol function fie flash interrupt enable. 0: int1# is not reassigned. 1: int1# is re-assigned to signal iap operation completion. external int1# interrupts are ignored. fcm[6:0] flash operation command 000_0001b chip-erase 000_1011b sector-erase 000_1101b block-erase 000_1100b byte-verify 1 000_1110b byte-program 000_1111b prog-sb1 000_0011b prog-sb2 000_0101b prog-sb3 000_1001b prog-sc0 000_1000benable-clock-double all other combinations are not implemented, and reserved for future use. 1. byte-verify has a single machine cycle latency and wi ll not generate any int1# interrupt regardless of fie. symbol function sfal mailbox register for interfacing with flash memory block. (low order address register). superflash configurat ion register (sfcf) location 76543210 reset value b1h - iapen ----swr bsel x0xxxx00b superflash command register (sfcm) location 76543210 reset value b2h fie fcm6 fcm5 fcm4 fcm3 fcm2 fcm1 fcm0 00h superflash address registers (sfal) location 76543210 reset value b3h superflash low order byte address register 00h
?2013 silicon storage technology, inc. ds25093b 02/13 23 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet symbol function sfah mailbox register for interfacing with flash memory block. (high order address register). symbol function sfdt mailbox register for interfacing wit h flash memory block. (data register). symbol function sb1 _i security bit 1 status (inverse of sb1 bit) sb2 _i security bit 2 status (inverse of sb2 bit) sb3 _i security bit 3 status (inverse of sb3 bit) please refer to table 25 for security lock options. edc _i double clock status 0: 12 clocks per machine cycle 1: 6 clocks per machine cycle flash_busyflash operation completion polling bit. 0: device has fully completed the last iap command. 1: device is busy with flash operation. superflash address registers (sfah) location 76543210 reset value b4h superflash high order byte address register 00h superflash data register (sfdt) location 76543210 reset value b5h superflash data register 00h superflash status register (sfst) (read only register) location 76543 2 10 reset value b6h sb1_i sb2_i sb3_i - edc_i flash_bu sy - - xxxxx0xxb
?2013 silicon storage technology, inc. ds25093b 02/13 24 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet symbol function ea global interrupt enable. 0 = disable 1 = enable ec pca interrupt enable. et2 timer 2 interrupt enable. es serial interrupt enable. et1 timer 1 interrupt enable. ex1 external 1 interrupt enable. et0 timer 0 interrupt enable. ex0 external 0 interrupt enable. symbol function ebo brown-out interrupt enable. 1 = enable the interrupt 0 = disable the interrupt interrupt enable (ie) location 76543210 reset value a8h ea ec et2 es et1 ex1 et0 ex0 00h interrupt enable a (iea) location 76543210 reset value e8h----ebo---xxxx0xxxb
?2013 silicon storage technology, inc. ds25093b 02/13 25 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet symbol function ppc pca interrupt priority bit pt2 timer 2 interrupt priority bit ps serial port interrupt priority bit pt1 timer 1 interrupt priority bit px1 external interrupt 1 priority bit pt0 timer 0 interrupt priority bit px0 external interrupt 0 priority bit symbol function ppch pca interrupt priority bit high pt2h timer 2 interrupt priority bit high psh serial port interrupt priority bit high pt1h timer 1 interrupt priority bit high px1h external interrupt 1 priority bit high pt0h timer 0 interrupt priority bit high px0h external interrupt 0 priority bit high symbol function pbo brown-out interrupt priority bit px2 external interrupt 2 priority bit px3 external interrupt 3 priority bit symbol function pboh brown-out interrupt priority bit high px2h external interrupt 2 priority bit high px3h external interrupt 3 priority bit high interrupt priority (ip) location 76543210 reset value b8h - ppc pt2 ps pt1 px1 pt0 px0 x0000000b interrupt priority high (iph) location 76543210 reset value b7h - ppch pt2h psh pt1h px1h pt0h px0h x0000000b interrupt priority 1 (ip1) location 76543210 reset value f8h 1 - - 1 pbo px3 px2 1 1xx10001b interrupt priority 1 high (ip1h) location 76543210 reset value f7h 1 - - 1 pboh px3h px2h 1 1xx10001b
?2013 silicon storage technology, inc. ds25093b 02/13 26 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet symbol function extram internal/external ram access 0: internal expanded ram access within range of 00h to 2ffh using movx @ri / @dptr. beyond 300h, the mcu always accesses external data memory. for details, refer to section , ?expanded data ram addressing? . 1: external data memory access. ao disable/enable ale 0: ale is emitted at a constant rate of 1/3 the oscillator frequency in 6 clock mode, 1/6 f osc in 12 clock mode. 1: ale is active only during a movx or movc instruction. symbol function gf2 general purpose user-defined flag. dps dptr registers select bit. 0: dptr0 is selected. 1: dptr1 is selected. symbol function wdout watchdog output enable. 0: watchdog reset will not be exported on reset pin. 1: watchdog reset if enabled by wdre, will assert reset pin for 32 clocks. wdre watchdog timer reset enable. 0: disable watchdog timer reset. 1: enable watchdog timer reset. wdts watchdog timer reset flag. 0: external hardware reset or power-on reset clears the flag. flag can also be cleared by writing a 1. flag survives if chip reset happened because of watchdog timer overflow. 1: hardware sets the flag on watchdog overflow. wdt watchdog timer refresh. 0: hardware resets the bit when refresh is done. 1: software sets the bit to force a watchdog timer refresh. swdt start watchdog timer. 0: stop wdt. 1: start wdt. auxiliary register (auxr) location 76543210 reset value 8eh------extra m ao xxxxxx00b auxiliary register 1 (auxr1) location 76543210 reset value a2h----gf20-dps xxxx00x0b watchdog timer control register (wdtc) location 76543210 reset value c0h - - - wdout wdre wdts wdt swdt xxx00000b
?2013 silicon storage technology, inc. ds25093b 02/13 27 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet symbol function wdtd initial/reload value in watchdog timer. new value won?t be effective until wdt is set. symbol function cf pca counter overflow flag set by hardware when the counter rolls over. cf flags an interrupt if bit ecf in cmod is set. cf may be set by either hardware or software, but can only cleared by software. cr pca counter run control bit set by software to turn the pca counter on. must be cleared by software to turn the pca counter off. - not implemented, reserved for future use. note: user should not write ?1?s to reserved bits. t he value read from a reserved bit is indeterminate. ccf4 pca module 4 interrupt flag. set by hardware when a match or capture occurs. must be cleared by software. ccf3 pca module 3 interrupt flag. set by hardware when a match or capture occurs. must be cleared by software. ccf2 pca module 2 interrupt flag. set by hardware when a match or capture occurs. must be cleared by software. ccf1 pca module 1 interrupt flag. set by hardware when a match or capture occurs. must be cleared by software. ccf0 pca module 0 interrupt flag. set by hardware when a match or capture occurs. must be cleared by software. watchdog timer data/reload register (wdtd) location 76543210 reset value 85h watchdog timer data/reload 00h pca timer/counter control register 1 (ccon) 1. bit addressable location 76543210 reset value d8h cf cr - ccf4 ccf3 ccf2 ccf1 ccf0 00x00000b
?2013 silicon storage technology, inc. ds25093b 02/13 28 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet symbol function cidl counter idle control: 0: programs the pca counter to continue functioning during idle mode 1: programs the pca counter to be gated off during idle wdte watchdog timer enable: 0: disables watchdog timer function on pca module 4 1: enables watchdog timer function on pca module 4 - not implemented, reserved for future use. note: user should not write ?1?s to reserved bits. the value read from a reserved bit is indeterminate. cps1 pca count pulse select bit 1 cps0 pca count pulse select bit 2 ecf pca enable counter overflow interrupt: 0: disables the cf bit in ccon 1: enables cf bit in ccon to generate an interrupt pca timer/counter mode register 1 (cmod) location 76543210 reset value d9h cidl wdte - - - cps1 cps0 ecf 00xxx000b 1. not bit addressable cps1 cps0 selected pca input 1 1. f osc = oscillator frequency 00 0 internal clock, f osc /6 in 6 clock mode (f osc /12 in 12 clock mode) 01 1 internal clock, f osc /2 in 6 clock mode (f osc /4 in 12 clock mode) 10 2 timer 0 overflow 11 3 external clock at eci/p1.2 pin (max. rate = f osc /4 in 6 clock mode, f osc /8 in 12 clock mode)
?2013 silicon storage technology, inc. ds25093b 02/13 29 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet symbol function - not implemented, reserved for future use. note: user should not write ?1?s to reserved bits. t he value read from a reserved bit is indeterminate. ecomn enable comparator 0: disables the comparator function 1: enables the comparator function cappn capture positive 0: disables positive edge capture on cex[4:0] 1: enables positive edge capture on cex[4:0] capnn capture negative 0: disables negative edge capture on cex[4:0] 1: enables negative edge capture on cex[4:0] matn match: set ecom[4:0] and mat[4:0] to implement the software timer mode 0: disables software timer mode 1: a match of the pca counter with this module?s compare/capture register causes the ccfn bit in ccon to be set, flagging an interrupt. togn toggle 0: disables toggle function 1: a match of the pca counter with this module?s compare/capture register causes the cexn pin to toggle. pwmn pulse width modulation mode 0: disables pwm mode 1: enables cexn pin to be used as a pulse width modulated output eccfn enable ccf interrupt 0: disables compare/capture flag ccf[4:0] in the ccon register to generate an interrupt request. 1: enables compare/capture flag ccf[4:0] in the ccon register to generate an interrupt request. pca compare/capture module mode register 1 (ccapmn) location 76543210 reset value dah - ecom0 capp0 capn0 mat0 tog0 pwm0 eccf0 00xxx000b dbh - ecom1 capp1 capn1 mat1 tog1 pwm1 eccf1 00xxx000b dch - ecom2 capp2 capn2 mat2 tog2 pwm2 eccf2 00xxx000b ddh - ecom3 capp3 capn3 mat3 tog3 pwm3 eccf3 00xxx000b deh - ecom4 capp4 capn4 mat4 tog4 pwm4 eccf4 00xxx000b 1. not bit addressable
?2013 silicon storage technology, inc. ds25093b 02/13 30 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet symbol function spie if both spie and es are set to one, spi interrupts are enabled. spe spi enable bit. 0: disables spi. 1: enables spi and connects ss#, mosi, miso, and sck to pins p1.4, p1.5, p1.6, p1.7. dord data transmission order. 0: msb first in data transmission. 1: lsb first in data transmission. mstr master/slave select. 0: selects slave mode. 1: selects master mode. cpol clock polarity 0: sck is low when idle (active high). 1: sck is high when idle (active low). cpha clock phase control bit. the cpha bit wit h the cpol bit control the clock and data relationship between master and slave. see figures 21 and 22. 0: shift triggered on the leading edge of the clock. 1: shift triggered on the trailing edge of the clock. spr1, spr0spi clock rate select bits. these two bits control the sck rate of the device configured as master. spr1 and spr0 have no effect on the slave. the relationship between sck and the oscillator frequency, f osc , is as follows: symbol function spif spi interrupt flag. upon completion of data transfer, this bit is set to 1. if spie =1 and es =1, an interrupt is then generated. this bit is cleared by software. wcol write collision flag. set if the spi data register is written to during data transfer. this bit is cleared by software. spi control register (spcr) location 76543210 reset value d5h spie spe dord mstr cpol cpha spr1 spr0 00h spr1 spr0 sck = f osc divided by 0 0 1 1 0 1 0 1 4 16 64 128 spi status register (spsr) location 76543210 reset value aahspifwcol------00 xxxxxxb
?2013 silicon storage technology, inc. ds25093b 02/13 31 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet symbol function smod1 double baud rate bit. if smod1 = 1, timer 1 is used to generate the baud rate, and the serial port is used in modes 1, 2, and 3. smod0 fe/sm0 selection bit. 0: scon[7] = sm0 1: scon[7] = fe, bof brown-out detection st atus bit, this bit will not be affected by any other reset. bof should be cleared by software. power-on reset will also clear the bof bit. 0: no brown-out. 1: brown-out occurred pof power-on reset status bit, this bit will not be affected by any other reset. pof should be cleared by software. 0: no power-on reset. 1: power-on reset occurred gf1 general-purpose flag bit. gf0 general-purpose flag bit. pd power-down bit, this bit is cleared by hardware after exiting from power-down mode. 0: power-down mode is not activated. 1: activates power-down mode. idl idle mode bit, this bit is cleared by hardware after exiting from idle mode. 0: idle mode is not activated. 1: activates idle mode. spi data register (spdr) location 76543210 reset value 86h spdr[7:0] 00h power control register (pcon) location 76543210 reset value 87h smod1 smod0 bof pof gf1 gf0 pd idl 00010000b
?2013 silicon storage technology, inc. ds25093b 02/13 32 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet symbol function fe set smod0 = 1 to access fe bit. 0: no framing error 1: framing error. set by receiver when an invalid stop bit is detected. this bit needs to be cleared by software. sm0 smod0 = 0 to access sm0 bit. serial port mode bit 0 sm1 serial port mode bit 1 sm2 enables the automatic address recognition feat ure in modes 2 or 3. if sm2 = 1 then ri will not be set unless the received 9th data bit (rb8) is 1, indicating an address, and the received byte is a given or broadcast ad dress. in mode 1, if sm2 = 1 then ri will not be activated unless a valid stop bit was received. in mode 0, sm2 should be 0. ren enables serial reception. 0: to disable reception. 1: to enable reception. tb8 the 9th data bit that will be transmitted in modes 2 and 3. set or clear by software as desired. rb8 in modes 2 and 3, the 9th data bit that was received. in mode 1, if sm2 = 0, rb8 is the stop bit that was received. in mode 0, rb8 is not used. ti transmit interrupt flag. set by hardware at the end of the 8th bit time in mode 0, or at the beginning of the stop bit in the other modes, in any serial transmission, must be cleared by software. ri receive interrupt flag. set by hardware at the end of the8th bit time in mode 0, or halfway through the stop bit time in the other modes, in any serial reception (except see sm2). must be cleared by software. serial port control register (scon) location 76543210 reset value 98h sm0/fe sm1 sm2 ren tb8 rb8 ti ri 00000000b sm0 sm1 mode description baud rate 1 1. f osc = oscillator frequency 0 0 0 shift register f osc /6 (6 clock mode) or f osc /12 (12 clock mode) 0 1 1 8-bit uart variable 1 0 2 9-bit uart f osc /32 or f osc /16 (6 clock mode) or f osc /64 or f osc /32 (12 clock mode) 1 1 3 9-bit uart variable
?2013 silicon storage technology, inc. ds25093b 02/13 33 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet symbol function tf2 timer 2 overflow flag set by a timer 2 overflow and must be cleared by software. tf2 will not be set when either rclk or tclk = 1. exf2 timer 2 external flag set when either a capture or reload is caused by a negative transition on t2ex and exen2 = 1. when timer 2 interrup t is enabled, exf2 = 1 will cause the cpu to vector to the timer 2 interrupt routine. exf2 must be cleared by software. exf2 does not cause an interrupt in up/down counter mode (dcen = 1). rclk receive clock flag. when set, causes the serial port to use timer 2 overflow pulses for its receive clock in modes 1 and 3. rclk = 0 causes timer 1 overflow to be used for the receive clock. tclk transmit clock flag. when set, causes the serial port to use timer 2 overflow pulses for its transmit clock in modes 1 and 3. tclk = 0 causes timer 1 overflow to be used for the transmit clock. exen2 timer 2 external enable flag. when set, allows a capture or reload to occur as a result of a negative transition on t2ex if timer 2 is not being used to clock the serial port. exen2 = 0 causes timer 2 to ignore events at t2ex. tr2 start/stop control for timer 2. a logic 1 starts the timer. c/t2# timer or counter select (timer 2) 0: internal timer (osc/6 in 6 clock mode, osc/12 in 12 clock mode) 1: external event counte r (falling edge triggered) cp/rl2# capture/reload flag. when set, captures will occur on negative trans itions at t2ex if exen2 = 1. when cleared, auto-relo ads will occur either with time r 2 overflows or negative transitions at t2ex when exen2 = 1. when either rclk = 1 or tclk = 1, this bit is ignored and the timer is forced to auto-reload on timer 2 overflow. symbol function - not implemented, reserved for future use. note: user should not write ?1?s to reserved bits. the value read from a reserved bit is indeterminate. t2oe timer 2 output enable bit. dcen down count enable bit. when set, this allows timer 2 to be configured as an up/down counter. timer/counter 2 control register (t2con) location 76543210 reset value c8h tf2 exf2 rclk tclk exen2 tr2 c/t2# cp/ rl2# 00h timer/counter 2 mode control (t2mod) location 76543210 reset value c9h------t2oedcenxx xxxx00b
?2013 silicon storage technology, inc. ds25093b 02/13 34 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet symbol function ex2 external interrupt 2 enable bit if set ie2 interrupt enable if it2=1, ie2 is set/cleared automatically by hardware when interrup t is detected/serviced. it2 external interrupt 2 is falling-edge/low-level triggered when this bit is cleared by software. ex3 external interrupt 3 enable bit if set ie3 interrupt enable if it3=1, ie3 is set/cleared automatically by hardware when interrup t is detected/serviced. it3 external interrupt3 is falling-edge/low-level tr iggered when this bit is cleared by software. external interrupt control (xicon) location 76543210 reset value aeh - ex3 ie3 it3 0 ex2 ie2 it2 00h
?2013 silicon storage technology, inc. ds25093b 02/13 35 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet flash memory programming the device internal flash memory can be progra mmed or erased using in-application programming (iap) mode product identification the read-id command accesses the signature bytes that identify the device and the manufacturer as sst. external programmers primarily use these signature bytes in the selection of programming algo- rithms. in-application programming mode the device offers either 72 kbyte of in-application programmable flash memory. during in-application programming, the cpu of the microcontroller enters iap mode. the two blocks of flash memory allow the cpu to execute user code from one block, while the other is being erased or reprogrammed con- currently. the cpu may also fetch code from an exte rnal memory while all internal flash is being repro- grammed. the mailbox registers (sfst, sfcm, sfal, sfah, sfdt and sfcf) located in the special function register (sfr), control and monitor the device?s erase and program process. table 14 outline the commands and their associated mailbox register settings. in-application program ming mode clock source during iap mode, both the cpu core and the flash controller unit are driven off the external clock. however, an internal oscillator will provide timing references for program and erase operations. the internal oscillator is only turned on when required, and is turned off as soon as the flash operation is completed. memory bank selecti on for in-applicatio n programming mode with the addressing range limited to 16 bit, only 64 kbyte of program address space is ?visible? at any one time. as shown in table 13, the bank selection (the configuration of ea# and sfcf[1:0]), allows block 1 memory to be overlaid on the lowest 8 kbyte of block 0 memory, making block 1 reachable. the same concept is employed to allow both block 0 and block 1 flash to be accessible to iap opera- tions. code from a block that is not visible may not be used as a source to program another address. however, a block that is not ?visible? may be programmed by code from the other block through mailbox registers. the device allows iap code in one block of memory to program the other block of memory, but may not program any location in the same block. if an iap operation originates physically from block 0, the tar- get of this operation is implicitly defined to be in block 1. if the iap operation originates physically from table 12: product identification address data manufacturer?s id 30h bfh device id sst89e516rd2/rd 31h 93h SST89V516RD2/rd 31h 92h t0-0.0 25093
?2013 silicon storage technology, inc. ds25093b 02/13 36 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet block 1, then the target address is implicitly defined to be in block 0. if the iap operation originates from external program space, then, the target will depend on the a ddress and the state of bank selec- tion. iap enable bit the iap enable bit, sfcf[6], enables in-application programming mode. until this bit is set, all flash programming iap commands will be ignored. in-application progr amming mode commands all of the following commands can onl y be initiated in the iap mode. in all situations, wr iting the control byte to the sfcm register will in itiate all of the operations. all commands will not be enabled if the security locks are enabled on the selected memory block. the program command is for programming new data into the memory array. the portion of the mem- ory array to be programmed should be in the erased state, ffh. if the memory is not erased, it should first be erased with an appropriate erase command. warning: do not attempt to write (program or erase) to a block that the code is currently fetching from. this will cause unpredictable program behavior and may corrupt program data. table 13: iap address resolution ea# sfcf[1:0] address of iap inst. target address block being programmed 1 00 >= 2000h (block 0) >= 2000h (block 0) none 1 1. no operation is performed because code from one block may not program the same originating block 1 00 >= 2000h (block 0) < 2000h (block 1) block 1 1 00 < 2000h (block 1) any (block 0) block 0 1 01, 10, 11 any (block 0) >= 2000h (block 0) none 1 1 01, 10, 11 any (block 0) < 2000h (block 1) block 1 0 00 from external >= 2000h (block 0) block 0 0 00 from external < 2000h (block 1) block 1 0 01, 10, 11 from external any (block 0) block 0 t0-0.0 25093
?2013 silicon storage technology, inc. ds25093b 02/13 37 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet chip-erase the chip-erase command erases all bytes in both memory blocks. this command is only allowed when ea#=0 (external memory execution). additionally this command is not permitted when the device is in level 4 locking. in all other instances, this command ignores the security lock status and will erase the security lock bits and re-map bits. figure 9: chip erase block-erase the block-erase command erases all bytes in one of two memory blocks (block 0 or block 1). the selection of the memory block to be erased is determined by the sfcf[1:0]. the block-erase com- mand sequence for sst89x516rdx is as follows: figure 10: block erase set-up mov sfdt, #55h interrupt scheme mov sfcm, #81h polling scheme mov sfcm, #01h int1 interrupt indicates completion sfst[2] indicates operation completion iap enable orl sfcf, #40h 1273 f05.0 set-up mov sfdt, #55h iap enable orl sfcf, #40h interrupt scheme mov sfcm, #8dh polling scheme mov sfcm, #0dh int1 interrupt indicates completion sfst[2] indicates operation completion select block configure sfcf[1:0] * 1273 f06.0 note: * see table 13
?2013 silicon storage technology, inc. ds25093b 02/13 38 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet sector-erase the sector-erase command erases all of the bytes in a sector. the sector size for the flash memory blocks is 128 bytes. the selection of the sector to be erased is determined by the contents of sfah and sfal. figure 11: sector erase byte-program the byte-program command programs data into a single byte. the address is determined by the con- tents of sfah and sfal. the data byte is in sfdt. figure 12: byte program program sector address mov sfah, #sector_addressh mov sfal, #sector_addressl interrupt scheme mov sfcm, #8bh polling scheme mov sfcm, #0bh int1 interrupt indicates completion sfst[2] indicates operation completion 1273 f07.0 iap enable orl sfcf, #40h move data to sfdt mov sfdt, #data interrupt scheme mov sfcm, #8eh polling scheme mov sfcm, #0eh int1 interrupt indicates completion sfst[2] indicates operation completion program byte address mov sfah, #byte_addressh mov sfal, #byte_addressl 1273 f08.0 iap enable orl sfcf, #40h
?2013 silicon storage technology, inc. ds25093b 02/13 39 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet byte-verify the byte-verify command allows the user to verify that the device has correctly performed an erase or program command. byte-verify command returns the data byte in sfdt if the command is successful. the user is required to check that the previous fl ash operation has fully completed before issuing a byte-verify. byte-verify command execution time is short enough that there is no need to poll for com- mand completion and no interrupt is generated. figure 13: byte verify prog-sb3, prog-sb2, prog-sb1 prog-sb3, prog-sb2, prog-sb1 commands are used to program the security bits (see table 25). com- pletion of any of these commands, the secu rity options will be updated immediately. security bits previously in un-programmed state can be programmed by these commands. prog-sb3, prog-sb2 and prog-sb1 commands should only reside in block 1 or external code memory. figure 14: prog-sb3, prog-sb2, prog-sb1 mov sfcm, #0ch sfdt register contains data program byte address mov sfah, #byte_addressh mov sfal, #byte_addressl 1273 f09.0 iap enable orl sfcf, #40h set-up mov sfdt, #0aah or or int1# interrupt indicates completion polling sfst[2] indicates completion program sb2 mov sfcm, #03h or mov sfcm, #83h program sb1 mov sfcm, #0fh or mov sfcm, #8fh program sb3 mov sfcm, #05h or mov sfcm, #85h 1273 f10.0 iap enable orl sfcf, #40h
?2013 silicon storage technology, inc. ds25093b 02/13 40 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet prog-sc0 prog-sc0 command is used to program the sc0 bi t. this command only changes the sc0 bit and has no effect on bsel bit until after a reset cycle. sc0 bit previously in un-programmed state can be programmed by this command. the prog-sc0 com- mand should reside only in block 1 or external code memory. figure 15: prog-sc0 enable-clock-double enable-clock-double command is used to make the mcu run at 6 clocks per machine cycle. the stan- dard (default) is 12 clocks per machine cycle (i.e. clock double command disabled). figure 16: enable-clock-double there are no iap counterparts for the external host commands select-block0 and select-block1. program sc0 interrupt scheme mov sfcm, #89h program sc0 polling scheme mov sfcm, #09h int1# interrupt indicates completion polling sfst[2] indicates completion 1273 f11.0 iap enable orl sfcf, #40h set-up program sc0 mov sfah, #5ah mov sfdt, #0aah program enable-clock-double interrupt scheme mov sfcm, #88h program enable-clock-double polling scheme mov sfcm, #08h int1# interrupt indicates completion polling sfst[2] indicates completion 1273 f12.0 iap enable orl sfcf, #40h set-up enable-clock-double mov sfah, #55h mov sfdt, #0aah
?2013 silicon storage technology, inc. ds25093b 02/13 41 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet polling a command that uses the polling method to detect flash operation completion should poll on the flash_busy bit (sfst[2]). when flash_busy de-asserts (logic 0), the device is ready for the next operation. movc instruction may also be used for verification of the programming and erase operation of the flash memory. movc instruction will fail if it is directed at a flash block that is still busy. interrupt termination if interrupt termination is selected, (sfcm[7] is set), then an in terrupt (int1) will be generated to indi- cate flash operation completion. under this condition, the int1 becomes an internal interrupt source. the int1# pin can now be used as a general purpose port pin and it cannot be the source of external interrupt 1 during in-application programming. in order to use an interrupt to signal flash operation termination. ex1 and ea bits of ie register must be set. the it1 bit of tcon register must also be set for edge trigger detection. . note: disiapl pin in plcc or tqfp will also disable iap commands if it is externally pulled low when reset. table 14: iap commands 1 1. sfcf[6]=1 enables iap commands; sfcf[6]=0 disables iap commands. operation sfcm [6:0] 2 2. interrupt/polling enable for flash operation completion sfcm[7] =1: interrupt enable for flash operation completion 0: polling enable for fl ash operation completion sfdt [7:0] sfah [7:0] sfal [7:0] chip-erase 3 3. chip-erase only functions in iap mode when ea#=0 (external memory execution) and device is not in level 4 locking. 01h 55h x 4 4. x can be v il or v ih , but no other value. x block-erase 5 5. refer to table 13 for address resolution 0dh 55h ah x sector-erase 5 0bh x ah 6 6. ah = address high order byte al 7 7. al = address low order byte byte-program 5 0eh di 8 8. di = data input, do = data output, all other values are in hex. ah al byte-verify (read) 5 0ch do 8 ah al prog-sb1 9 9. instruction must be located in block 1 or external code memory. 0fh aah x x prog-sb2 9 03h aah x x prog-sb3 9 05h aah x x prog-sc0 9 09h aah 5ah x enable-clock-double 9 08h aah 55h x t0-0.0 25093
?2013 silicon storage technology, inc. ds25093b 02/13 42 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet timers/counters timers the device has three 16-bit registers that can be used as either timers or event counters. the three timers/counters are denoted timer 0 (t0), timer 1 (t1), and timer 2 (t2). each is designated a pair of 8-bit registers in the sfrs. the pair consists of a most significant (high) byte and least significant (low) byte. the respective registers are tl0, th0, tl1, th1, tl2, and th2. timer set-up refer to table 9 for tmod, tcon, and t2con registers regarding timers t0, t1, and t2. the follow- ing tables provide tmod values to be used to set up timers t0, t1, and t2. except for the baud rate generator mode, the values given for t2con do not include the setting of the tr2 bit. therefore, bit tr2 must be set separately to turn the timer on. table 15: timer/counter 0 mode function tmod internal control 1 1. the timer is turned on/off by setting/clearing bit tr0 in the software. external control 2 2. the timer is turned on/off by the 1 to 0 transit ion on int0# (p3.2) when tr0 = 1 (hardware control). used as timer 0 13-bit timer 00h 08h 1 16-bit timer 01h 09h 2 8-bit auto-reload 02h 0ah 3 two 8-bit timers 03h 0bh used as counter 0 13-bit timer 04h 0ch 1 16-bit timer 05h 0dh 2 8-bit auto-reload 06h 0eh 3 two 8-bit timers 07h 0fh t0-0.0 25093 table 16: timer/counter 1 mode function tmod internal control 1 1. the timer is turned on/off by setting/clearing bit tr1 in the software. external control 2 2. the timer is turned on/off by the 1 to 0 transit ion on int1# (p3.3) when tr1 = 1 (hardware control). used as timer 0 13-bit timer 00h 80h 1 16-bit timer 10h 90h 2 8-bit auto-reload 20h a0h 3 does not run 30h b0h used as counter 0 13-bit timer 40h c0h 1 16-bit timer 50h d0h 2 8-bit auto-reload 60h e0h 3 not available - - t0-0.0 25093
?2013 silicon storage technology, inc. ds25093b 02/13 43 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet programmable clock-out a 50% duty cycle clock can be programmed to come out on p1.0. this pin, besides being a regular i/o pin, has two alternate functions. it can be programmed: 1. to input the external clock for timer/counter 2, or 2. to output a 50% duty cycle clock ranging from 122 hz to 8 mhz at a 16 mhz operating fre- quency (61 hz to 4 mhz in 12 clock mode). to configure timer/counter 2 as a clock generator, bit c/#t2 (in t2con) must be cleared and bit t20e in t2mod must be set. bit tr2 (t2con.2) also must be set to start the timer. the clock-out frequency depends on the oscillator frequency and the reload value of timer 2 capture registers (rcap2h, rcap2l) as shown in this equation: oscillator frequency n x (65536 - rcap2h, rcap2l) n =2 (in 6 clock mode) 4 (in 12 clock mode) where (rcap2h, rcap2l) = the contents of rcap2h and rcap2l taken as a 16-bit unsigned inte- ger. in the clock-out mode, timer 2 roll-overs will not generate an interrupt. this is similar to when it is used as a baud-rate generator. it is possible to use timer 2 as a baud-rate generator and a clock gen- erator simultaneously. note, however, that the bau d-rate and the clock-out frequency will not be the same. table 17: timer/counter 2 mode t2con internal control 1 1. capture/reload occurs only on timer/counter overflow. external control 2 2. capture/reload occurs on timer/counter overflow and a 1 to 0 transition on t2ex (p1.1) pin except when timer 2 is used in the baud rate generating mode. used as timer 16-bit auto-reload 00h 08h 16-bit capture 01h 09h baud rate generator receive and transmit same baud rate 34h 36h receive only 24h 26h transmit only 14h 16h used as counter 16-bit auto-reload 02h 0ah 16-bit capture 03h 0bh t0-0.0 25093
?2013 silicon storage technology, inc. ds25093b 02/13 44 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet serial i/o full-duplex, enhanced uart the device serial i/o port is a full-duplex port that allows data to be transmitted and received simulta- neously in hardware by the transmit and receive registers, respectively, while the software is perform- ing other tasks. the transmit and receive registers are both located in the serial data buffer (sbuf) special function register. writing to the sbuf register loads the transmit register, and reading from the sbuf register obtains the contents of the receive register. the uart has four modes of operation which are selected by the serial port mode specifier (sm0 and sm1) bits of the serial port control (scon) special function register. in all four modes, transmission is initiated by any instruction that uses the sbuf register as a destination register. reception is initiated in mode 0 when the receive interrupt (ri) flag bit of the serial port control (scon) sfr is cleared and the reception enable/ disable (ren) bit of the scon register is set. reception is initiated in the other modes by the incoming start bit if the ren bit of the scon register is set. framing error detection framing error detection is a feature, which allows the receiving contro ller to check for valid stop bits in modes 1, 2, or 3. missing stops bits can be caused by noise in serial lines or from simultaneous trans- mission by two cpus. framing error detection is selected by going to the pcon register and changing smod0 = 1 (see fig- ure 17). if a stop bit is missing, the framing error bi t (fe) will be set. software may examine the fe bit after each reception to check for data errors. afte r the fe bit has been set, it can only be cleared by software. valid stop bits do not clear fe. when fe is enabled, ri rises on the stop bit, instead of the last data bit (see figure 18 and figure 19). figure 17: framing error block diagram 1273 f13.0 sm0/fe sm1 sm2 ren tb8 rb8 ti ri smod0 smod1 pof gf1 gf0 pd idl scon (98h) pcon (87h) set fe bit if stop bit is 0 (framing error) (smod0 = 1) sm0 to uart mode control (smod0 = 0) to uart framing error control bof
?2013 silicon storage technology, inc. ds25093b 02/13 45 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet figure 18: uart timings in mode 1 figure 19: uart timings in modes 2 and 3 automatic address recognition automatic address recognition helps to reduce the mcu time and power required to talk to multiple serial devices. each device is hooked together sharing the same serial link with its own address. in this configuration, a device is only interrupted when it receives its own address, thus eliminating the soft- ware overhead to compare addresses. this same feature helps to save power because it can be used in conjunction with idle mode to reduce the system?s overall power consumption. since there may be multiple slaves hooked up serial to one master, only one slave would have to be interrupted from idle mode to respond to the master?s trans- mission. automatic address recognit ion (aar) allows the other slaves to remain in idle mode while only one is interrupted. by limiting the number of interruptions, the total current draw on the system is reduced. there are two ways to communicate with slaves: a group of them at once, or all of them at once. to communicate with a group of slaves, the master sends out an address called the given address. to communicate with all the slaves, the master sends out an address called the ?broadcast? address. aar can be configured as mode 2 or 3 (9-bit modes) and setting the sm2 bit in scon. each slave has its own sm2 bit set waiting for an address byte (9th bit = 1). the re ceive interrupt (ri) flag will only be set when the received byte matches either the given address or the broadcast address. next, the slave then clears its sm2 bit to enable reception of the data bytes (9th bit = 0) from the master. when the 9th bit = 1, the master is sending an address. when the 9th bit = 0, the master is sending actual data. start bit rxd ri smod0=x fe smod0=1 d0 d1 d2 d3 d4 d5 d6 d7 data byte stop bit 1273 f14.0 start bit rxd ri smod0=1 fe smod0=1 ri smod0=0 d0 d1 d2 d3 d4 d5 d6 d7 d8 data byte ninth bit stop bit 1273 f15.0
?2013 silicon storage technology, inc. ds25093b 02/13 46 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet if mode 1 is used, the stop bit takes the place of the 9th bit. bit ri is set only when the received com- mand frame address matches the device?s address and is terminated by a valid stop bit. note that mode 0 cannot be used. setting sm2 bit in the sc on register in mode 0 will have no effect. each slave?s individual address is specified by sfr saddr. sfr saden is a mask byte that defines ?don?t care? bits to form the given address when combined with saddr. see the example below: using the given address to select slaves any bits masked off by a 0 from saden become a ?don?t care? bit for the given address. any bit masked off by a 1, becomes anded with saddr. the ?don?t cares? provide flexibility in the user- defined addresses to address more slaves when using the given address. shown in the example above, slave 1 has been given an address of 1111 0001 (saddr). the saden byte has been used to mask off bits to a given address to allow more combinations of selecting slave 1 and slave 2. in this case for the given addresses, the last bit (lsb) of slave 1 is a ?don?t care? and the last bit of slave 2 is a 1. to communicate with slave 1 and slave 2, the master would need to send an address with the last bit equal to 1 (e.g. 1111 0001) since slave 1?s last bit is a don?t care and slave 2?s last bit has to be a 1. to communicate with slave 1 alone, the master would send an address with the last bit equal to 0 (e.g. 1111 0000), since slave 2?s last bit is a 1. see the table below for other possible combinations. slave 1 saddr = 1111 0001 saden = 1111 1010 given = 1111 0x0x slave 2 saddr = 1111 0011 saden = 1111 1001 given = 1111 0xx1 select slave 1 only slave 1 given address possible addresses 1111 0x0x 1111 0000 1111 0100 select slave 2 only slave 2 given address possible addresses 1111 0xx1 1111 0111 1111 0011 select slaves 1 & 2 slaves 1 & 2 possible addresses 1111 0001 1111 0101
?2013 silicon storage technology, inc. ds25093b 02/13 47 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet if the user added a third slave such as the example below: the user could use the possible addresses above to select slave 3 only. another combination could be to select slave 2 and 3 only as shown below. more than one slave may have t he same saddr address as well, and a given address could be used to modify the address so that it is unique. using the broadcast address to select slaves using the broadcast address, the master can commun icate with all the slaves at once. it is formed by performing a logical or of saddr and saden with ?0?s in the result treated as ?don?t cares?. ?don?t cares? allow for a wider range in defining the broadcast address, but in most cases, the broad- cast address will be ffh. on reset, saddr and saden are ?0?. this produces an given address of all ?don?t cares? as well as a broadcast address of all ?don?t cares.? this effectively disables automatic addressing mode and allows the microcontroller to function as a standard 8051, which does not make use of this feature. slave 3 saddr = 1111 1001 saden = 1111 0101 given = 1111 x0x1 select slave 3 only slave 2 given address possible addresses 1111 x0x1 1111 1011 1111 1001 select slaves 2 & 3 only slaves 2 & 3 possible addresses 1111 0011 slave 1 1111 0001 = saddr +1111 1010 = saden 1111 1x11 = broadcast
?2013 silicon storage technology, inc. ds25093b 02/13 48 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet serial peripheral interface spi features ? master or slave operation ? 10 mhz bit frequency (max) ? lsb first or msb first data transfer ? four programmable bit rates ? end of transmission (spif) ? write collision flag protection (wcol) ? wake up from idle mode (slave mode only) spi description the serial peripheral interface (spi) allows high-speed synchronous data transfer between the sst89e/v516rdx and peripheral devices or between several sst89e/v516rdx devices. figure 20 shows the correspondence between master and slave spi devices. the sck pin is the clock output and inpu t for the master and slave modes, respecti vely. the spi clock generator will start follow- ing a write to the master devices spi data register. the written data is then shifted out of the mosi pin on the master device into the mosi pin of the slave device. following a complete transmission of one byte of data, the spi clock generator is stopped and the spif flag is set. an spi interrupt request will be generated if the spi interrupt enable bit (spie) and the serial port interrupt enable bit (es) are both set. an external master drives the slave select input pin, ss#/p1[4], low to select the spi module as a slave. if ss#/p1[4] has not been driven low, then the slave spi unit is not active and the mosi/p1[5] port can also be used as an input port pin. cpha and cpol control the phase and polarity of the spi clock. figures 21 and 22 show the four pos- sible combinations of these two bits. figure 20: spi master-slave interconnection 1273 f16.0 8-bit shift register msb master lsb spi clock generator miso miso mosi mosi sck sck ss# ss# 8-bit shift register msb slave lsb v ss v dd
?2013 silicon storage technology, inc. ds25093b 02/13 49 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet spi transfer formats figure 21: spi transfer format with cpha = 0 figure 22: spi transfer format with cpha = 1 1273 f17.0 msb sck cycle # (for reference) sck (cpol=0) sck (cpol=1) mosi (from master) miso (from slave) ss# (to slave) 6 12345678 5 msb 654321lsb 4 3 2 1 lsb 1273 f18.0 msb sck cycle # (for reference) sck (cpol=0) sck (cpol=1) mosi (from master) miso (from slave) ss# (to slave) 6 12345678 5 msb654321 lsb 4 3 2 1 lsb
?2013 silicon storage technology, inc. ds25093b 02/13 50 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet watchdog timer the device offers a programmable watchdog timer (wdt) for fail safe protection against software deadlock and automatic recovery. to protect the system against software deadlock, the user software must refresh the wdt within a user-defined time period. if the software fails to do this periodical refresh, an internal hardware reset will be initiated if enabled (wdre= 1). the software can be designed such that the wdt times out if the program does not work properly. the wdt in the device uses the system clock (xtal1) as its time base. so strictly speaking, it is a watchdog counter rather than a wa tchdog timer. the wdt register will increment every 344,064 crystal clocks. the upper 8-bits of the time base register (wdtd) are used as the reload register of the wdt. the wdts flag bit is set by wdt overflow and is not changed by wdt reset. user software can clear wdts by writing ?1? to it. figure 23 provides a block diagram of the wdt. two sfrs (wdtc and wdtd) control watchdog timer operation. during idle mode, wdt operation is temporarily suspended, and resumes upon an interrupt exit from idle. the time-out period of the wdt is calculated as follows: period = (255 - wdtd) * 344064 * 1/f clk (xtal1) where wdtd is the value loaded into the wdtd register and f osc is the oscillator frequency. figure 23: block diagram of programmable watchdog timer 1273 f19.0 wdt upper byte wdt reset internal reset 344064 clks counter clk (xtal1) ext. rst wdtc wdtd
?2013 silicon storage technology, inc. ds25093b 02/13 51 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet programmable counter array the programmable counter array (pca) present on the sst89e/v516rdx is a special 16-bit timer that has five 16-bit capture/compare modules. each of the modules can be programmed to operate in one of four modes: rising and/or falling edge capture, software timer, high-speed output, or pulse width modulator. the 5th module can be programmed as a watchdog timer in addition to the other four modes. each module has a pin associated with it in port 1. module 0 is connected to p1.3 (cex0), module 1 to p1[4] (cex1), module 2 to p1[5] (cex2), module 3 to p1[6] (cex3), and module 4 to p1[7] (cex4). pca configuration is shown in figure 24. pca overview pca provides more timing capabilities with less cp u intervention than the standard timer/ counter. its advantages include reduced software overhead and improved accuracy. the pca consists of a dedicated timer/counter which se rves as the time base for an array of five com- pare/capture modules. figure 24 shows a block diagram of the pca. external events associated with modules are shared with correspondi ng port 1 pins. modules not usin g the port pins can still be used for standard i/o. each of the five modules can be programmed in any of the following modes: ? rising and/or fa lling edge capture ? software timer ? high speed output ? watchdog timer (module 4 only) ? pulse width modulator (pwm) pca timer/counter the pca timer is a free-running 16-bit timer consisting of registers ch and cl (the high and low bytes of the count values). the pca timer is common time base for all five modules and can be programmed to run at: 1/6 the oscillato r frequency, 1/2 the oscilla tor frequency, timer 0 over flow, or the input on the eci pin (p1.2). the timer/counter source is determined from the cps1 and cps0 bits in the cmod sfr as follows (see ?pca timer/counte r mode register (cmod)? on page 28): table 18: pca timer/counter source cps1 cps0 12 clock mode 6 clock mode 00 f osc /12 f osc /6 01 f osc /4 f osc /2 1 0 timer 0 overflow timer 0 overflow 1 1 external clock at eci pin (maximum rate = f osc /8) external clock at eci pin (maximum rate = f osc /4) t0-0.0 25093
?2013 silicon storage technology, inc. ds25093b 02/13 52 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet figure 24: pca timer/counter and compare/capture modules the table below summarizes various clock inputs at two common frequencies. the four possible cmod timer modes with and without the overflow interrupt enabled are shown below. this list assumes that pca will be left running during idle mode. the ccon register is associated with all pca timer functions. it contains run control bits and flags for the pca timer (cf) and all modules. to run the pca the cr bit (ccon.6) must be set by software. clearing the bit, will turn off pca. when the pca counter overflows, the cf (ccon.7) will be set, and table 19: pca timer/counter inputs pca timer/counter mode clock increments 12 mhz 16 mhz mode 0: f osc /12 1 sec 0.75 sec mode 1: 330 nsec 250 nsec mode 2: timer 0 overflows 1 1. in mode 2, the overflow interrupt for timer 0 does not need to be enabled. timer 0 programmed in: 8-bit mode 256 sec 192 sec 16-bit mode 65 msec 49 sec 8-bit auto-reload 1 to 255 sec 0.75 to 191 sec mode 3: external input max 0.66 sec 0.50 sec t0-0.0 25093 table 20: cmod values pca count pulse selected cmod value without interrupt enable d with interrupt enabled internal clock, f osc /12 00h 01h internal clock, f osc /4 02h 03h timer 0 overflow 04h 05h external clock at p1.2 06h 07h t0-0.0 25093 module 0 module 1 module 2 module 3 module 4 pca timer/counter 1273 f20.0 p1.7/cex4 p1.6/cex3 p1.5/cex2 p1.4/cex1 p1.3/cex0 16 bits 16 bits each
?2013 silicon storage technology, inc. ds25093b 02/13 53 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet an interrupt will be generated if the ecf bit in the cm od register is set. the cf bit can only be cleared by software. each module has its own timer interrupt or capture interrupt flag (ccf0 for module 0, ccf4 for module 4, etc.). they are set when either a match or capture occurs. these flags can only be cleared by software. (see ?pca timer/counter control register (ccon)? on page 27.) compare/capture modules each pca module has an associated sfr with it. thes e registers are: ccapm0 for module 0, ccapm1 for module 1, etc. refer to ?pca compare/capture module mode register (ccapmn)? on page 29 for details. the registers each contain 7 bits which are used to control the mode each module will operate in. the eccf bit (ccapmn.0 where n = 0, 1, 2, 3, or 4 dependin g on module) will enable the cc f flag in the ccon sfr to generate an interrupt when a match or compare occurs. pwm (ccapmn.1) enables the pulse width modula- tion mode. the tog bit (ccapmn.2) when set, causes the cex output associated with the module to toggle when there is a match between the pca counter and the module?s capture/compare register. when there is a match between the pca counter and the module?s capture/compare register, the matn (ccapmn.3) and the ccfn bit in the ccon register to be set. bits capn (ccapmn.4) and capp (ccapmn.5) determine whether the capture input will be active on a pos- itive edge or negative edge. the capn bit enables the negativ e edge that a capture input will be active on, and the capp bit enables the positive edge. when both bits are set, both edges will be enabled and a capture will occur for either transition. the last bit in the register ecom (ccapmn.6) when set, enables the compara- tor function. table 22 shows the ccapmn settings for the various pca functions. there are two additional register associated with each of the pca modules: ccapnh and ccapnl. they are registers that hold the 16-bit count value when a capture occurs or a compare occurs. when a module is used in pwm mode, these registers are used to control the duty cycle of the output. see figure 24. table 21: pca high and low register compare/capture modules symbol description direct address bit address, symbol, or alternative port function reset value msb lsb ccap0h pca module 0 compare/capture registers fah ccap0h[7:0] 00h ccap0l eah ccap0l[7:0] 00h ccap1h pca module 1 compare/capture registers fbh ccap1h[7:0] 00h ccap1l ebh ccap1l[7:0] 00h ccap2h pca module 2 compare/capture registers fch ccap2h[7:0] 00h ccap2l ech ccap2l[7:0] 00h ccap3h pca module 3 compare/capture registers fdh ccap3h[7:0] 00h ccap3l edh ccap3l[7:0] 00h ccap4h pca module 4 compare/capture registers feh ccap4h[7:0] 00h ccap4l eeh ccap4l[7:0] 00h t0-0.0 25093
?2013 silicon storage technology, inc. ds25093b 02/13 54 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet table 22: pca module modes without interr upt enabled - 1 ecomy 2 cappy 2 capny 2 maty 2 togy 2 pwmy 2 eccfy 2 module code - 0 0 0 0 0 0 0 no operation - 0 1 0 0 0 0 0 16-bit capture on positive-edge trigger at cex[4:0] - 0 0 1 0 0 0 0 16-bit capture on negative-edge trigger at cex[4:0] - 0 1 1 0 0 0 0 16-bit capture on positive/negative-edge trigger at cex[4:0] - 1 0 0 1 0 0 0 compare: software timer - 1 0 0 1 1 0 0 compare: high-speed output - 1 0 0 0 0 1 0 compare: 8-bit pwm -1 0 0 10 or 1 3 0 0 compare: pca wdt (ccapm4 only) 4 t0-0.0 25093 1. user should not write ?1?s to reserved bits. t he value read from a reserved bit is indeterminate. 2. y = 0, 1, 2, 3, 4 3. a 0 disables toggle function. a 1 enables toggle function on cex[4:0] pin. 4. for pca wdt mode, also set the wdte bit in the cmod register to enable the reset output signal. table 23: pca module modes with interrupt enabled - 1 1. user should not write ?1?s to reserved bits. t he value read from a reserved bit is indeterminate. ecomy 2 2. y = 0, 1, 2, 3, 4 cappy 2 capny 2 maty 2 togy 2 pwmy 2 eccfy 2 module code - 0 1 0 0 0 0 1 16-bit capture on positive-edge trig- ger at cex[4:0] - 0 0 1 0 0 0 1 16-bit capture on negative-edge trig- ger at cex[4:0] - 0 1 1 0 0 0 1 16-bit capture on positive/negative- edge trigger at cex[4:0] - 1 0 0 1 0 0 1 compare: software timer - 1 0 0 1 1 0 1 compare: high-speed output -1 0 0 0 0 1 x 3 3. no pca interrupt is needed to generate the pwm. compare: 8-bit pwm -1 0 0 10 or 1 4 4. a 0 disables toggle function. a 1 enables toggle function on cex[4:0] pin. 0x 5 5. enabling an interrupt for the watchdog timer would defeat the purpose of the watchdog timer. compare: pca wdt (ccapm4 only) 6 6. for pca wdt mode, also set the wdte bit in the cmod register to enable the reset output signal. t0-0.0 25093
?2013 silicon storage technology, inc. ds25093b 02/13 55 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet capture mode capture mode is used to capture the pca timer/counter value into a module?s capture registers (ccapnh and ccapnl). the capture will occur on a positive edge, negat ive edge, or both on the cor- responding module?s pin. to use one of the pca modules in the capture mode, either one or both the ccapm bits capn and capp for that module must be set. when a valid transit ion occurs on the cex pin corresponding to the module used, the pca hard ware loads the 16-bit value of the pca counter register (ch and cl) into the module?s capture registers (ccapnl and ccapnh). if the ccfn bit for the module in the ccon sfr and the eccfn bit in the ccapmn sfr are set, then an interrupt will be generated. in the interrupt service routine, the 16-bit capture value must be saved in ram before the next event capture occurs. if a subsequent capture occurred, the original capture values would be lost. after flag event flag has been set by hardware, the user must clear the flag in software. (see figure 25) figure 25: pca capture mode 1273 f21.0 cf cr ccf4 ccf3 ccf2 ccf1 ccf0 ecomn cappn capnn matn togn pwmn eccfn ccon ccapmn n=0 to 4 pca interrupt ch cl ccapnh ccapnl pca timer/counter capture cexn 0000
?2013 silicon storage technology, inc. ds25093b 02/13 56 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet 16-bit software timer mode the 16-bit software timer mode is used to trigger interrupt routines, which must occur at periodic inter- vals. it is setup by setting both the ecom and mat bits in the module?s ccapmn register. the pca timer will be compared to the modu le?s capture registers (ccapn l and ccapnh) and when a match occurs, an interrupt will occur, if the ccfn (ccon sfr) and the eccfn (ccapmn sfr) bits for the module are both set. if necessary, a new 16-bit compare value can be loaded into ccapnh and ccapnl during the inter- rupt routine. the user should be aware that the hardware temporarily disables the comparator function while these registers are being u pdated so that an invalid match will not occur. thus, it is recom- mended that the user write to the low byte first (ccapnl) to disable the comparator, then write to the high byte (ccapnh) to re-enable it. if any updates to the registers are done, the user may want to hold off any interrupts from occurring by clearing the ea bit. (see figure 26) figure 26: pca compare mode (software timer) high speed output mode the high speed output mode is used to toggle a po rt pin when a match occurs between the pca timer and the preloaded value in the compare registers. in this mode, the cex output pin (on port 1) associ- ated with the pca module will toggle every time there is a ma tch between the pc a counter (ch and cl) and the capture registers (ccapnh and ccapnl). to activate this mode, the user must set tog, mat, and ecom bits in the module?s ccapmn sfr. high speed output mode is much more accurate th an toggling pins since the toggle occurs before branching to an interrupt. in this case, interrupt latency will not affect the accuracy of the output. when using high speed output, using an interrupt is optional. only if the user wishes to change the time for the next toggle is it necessary to update the comp are registers. otherwise, the next togg le will occur when the pca timer rolls over and matches the last compare value. (see figure 27) 1273 f22.0 cf cr ccf4 ccf3 ccf2 ccf1 ccf0 ecomn cappn capnn matn togn pwmn eccfn ccon ccapmn n=0 to 4 pca interrupt ch cl ccapnh ccapnl pca timer/counter 0 000 16-bit comparator reset write to ccapnl write to ccapnh 10 enable match
?2013 silicon storage technology, inc. ds25093b 02/13 57 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet figure 27: pca high speed output mode pulse width modulator the pulse width modulator (pwm) mode is used to generate 8-bit pwms by comparing the low byte of the pca timer (cl) with the low byte of the compare register (ccapnl). when cl < ccapnl the out- put is low. when cl ccapnl the output is high. to activate this mode, the user must set the pwm and ecom bits in the module?s ccapmn sfr. (see figure 28 and table 24) in pwm mode, the frequency of the output depends on the source for the pca timer. since there is only one set of ch and cl registers, all modules share the pca timer and frequency. duty cycle of the output is controlled by the value loaded into the high byte (ccapnh). since writes to the ccapnh reg- ister are asynchronous, a new value written to the high byte will not be shifted into ccapnl for com- parison until the next period of the output (when cl rolls over from 255 to 00). to calculate values for ccapnh for any duty cycle, use the following equation: ccapnh = 256(1 - duty cycle) where ccapnh is an 8-bit integer and duty cycle is a fraction. 1273 f23.0 cf cr ccf4 ccf3 ccf2 ccf1 ccf0 ecomn cappn capnn matn togn pwmn eccfn ccon ccapmn n=0 to 4 pca interrupt ch cl ccapnh ccapnl pca timer/counter 0 00 16-bit comparator reset write to ccapnl write to ccapnh 10 enable match cexn to g g l e
?2013 silicon storage technology, inc. ds25093b 02/13 58 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet figure 28: pca pulse width modulator mode table 24: pulse width modulator frequencies pca timer mode pwm frequency 12 mhz 16 mhz 1/12 oscillator frequency 3.9 khz 5.2 khz 1/4 oscillator frequency 11.8 khz 15.6 khz timer 0 overflow: 8-bit 15.5 hz 20.3 hz 16-bit 0.06 hz 0.08 hz 8-bit auto-reload 3.9 khz to 15.3 hz 5.2 khz to 20.3 hz external input (max) 5.9 khz 7.8 khz t0-0.0 25093 1273 f24.0 ecomn cappn capnn matn togn pwmn eccfn ccapmn n=0 to 4 cl ccapnl ccapnh pca timer/counter 0 00 00 8-bit comparator overflow cl < ccapnl cl >= ccapnl enable cexn 0 1
?2013 silicon storage technology, inc. ds25093b 02/13 59 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet watchdog timer the watchdog timer mode is used to improve reliability in the syst em without increasing chip count (see figure 29). watchdog timers are useful for systems that are susceptible to noise, power glitches, or electrostatic discharge. it can also be used to prevent a software deadlock. if during the execution of the user?s code, there is a deadloc k, the watchdog timer will time ou t and an internal reset will occur. only module 4 can be programmed as a watchdog time r (but still can be programmed to other modes if the watchdog timer is not used). to use the watchdog timer, the user pre-loads a 16-bit value in the compare register. just like the other compare modes, this 16-bit value is compared to the pca timer value. if a match is allowed to occur, an internal reset will be generated. this will not cause the rst pin to be driven high. in order to hold off the reset, the user has three options: 1. periodically change the co mpare value so it will never match the pca timer, 2. periodically change the pca timer value so it will never match the compare values, or 3. disable the watchdog timer by clearing the wdte bit before a match occurs and then re- enable it. the first two options are more reliable because the wa tchdog timer is never disabled as in option #3. if the program counter ev er goes astray, a match will eventually o ccur and cause an internal reset. the second option is also not recommended if other pca modules are being used. remember, the pca timer is the time base for all modules; changing the time base for other modules would not be a good idea. thus, in most application the first solution is the best option. use the code below to initialize the watchdog timer. module 4 can be configured in either compare mode, and the wdte bit in cmod must also be set. the user?s software then must periodically change (ccap4h, ccap4l) to keep a match from occurring with the pca timer (ch, cl). this code is given in the watchdog routine below. ;============================================== init_watchdog: movccapm4, #4ch; module 4 in compare mode movccap4l, #0ffh; write to low byte first movccap4h, #0ffh; before pca timer counts up ; to ffff hex, these compare ; values must be changed. orlcmod, #40h; set the wdte bit to enable the ; watchdog timer without ; changing the other bits in ; cmod ;============================================== ;main program goes here, but call watchdog periodically. ;============================================== watchdog:
?2013 silicon storage technology, inc. ds25093b 02/13 60 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet clr ea; hold off interrupts movccap4l, #00; next compare value is within movccap4h, ch; 65,535 counts of the ; current pca setbea; timer value ret ;============================================== this routine should not be part of an interrupt service routine. if the program counter goes astray and gets stuck in an infinite loop, interrupts will still be serviced and the watchd og will keep getting reset. thus, the purpose of the watchdog would be defeated. instead, call this subroutine from the main pro- gram of the pca timer. figure 29: pca watchdog timer (module 4 only) 1273 f25.0 cidl wdte cps1 cps0 ecf ecomn cappn capnn matn togn pwmn eccfn cmod ccapm4 reset ch cl ccap4h ccap4l pca timer/counter 0 0x0 16-bit comparator reset write to ccap4l write to ccap4h 10 enable match module 4 1x
?2013 silicon storage technology, inc. ds25093b 02/13 61 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet security lock the security lock protects against software piracy and prevents the contents of the flash from being read by unauthorized parties. it also protects against code corruption resulting from accidental erasing and programming to the internal flash memory. there are two different types of security locks in the device security lock system: hard lock and softlock. hard lock when hard lock is activated, movc or iap instructions executed from an unlocked or soft locked pro- gram address space, are disabled from reading code bytes in hard locked memory blocks (see table 26). hard lock can either lock both flash memory blocks or just lock the 8 kbyte flash memory block (block 1). all external host and iap commands except for chip-erase are ignored for memory blocks that are hard locked. softlock softlock allows flash contents to be altered under a secure environment. this lock option allows the user to update program code in the soft locked memory block through in-application programming mode under a predetermined secure environment. for example, if block 1 (8k) memory block is locked (hard locked or soft locked), and block 0 memory block is soft locked, code residing in block 1 can pro- gram block 0. the following iap mode commands issued through the command mailbox register, sfcm, executed from a locked (hard locked or soft locked) block, can be operated on a soft locked block: block-erase, sector-erase, byte-program and byte-verify. in external host mode, softlock behaves the same as a hard lock. security lock status the three bits that indicate the device security lock status are located in sfst[7:5]. as shown in figure 30 and table 25, the three security lock bits control the lock status of the primary and secondary blocks of memory. there are four distinct levels of security lock status. in the first level, none of the security lock bits are programmed and both blocks are unlocked. in the second level, although both blocks are now locked and cannot be programmed, they are available for read operation via byte-verify. in the third level, three different options are available: block 1 hard lock / block 0 softlock, softlock on both blocks, and hard lock on both blocks. locking both blocks is the same as level 2, block 1 except read operation isn?t available. the fourth level of security is the most secure level. it doesn?t allow read/pro- gram of internal memory or boot from external memory. for details on how to program the security lock bits refer to the external host mode and in-application programming sections.
?2013 silicon storage technology, inc. ds25093b 02/13 62 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet figure 30: security lock levels note: p = programmed (bit logic state = 0), u = unprogrammed (bit logic state = 1), n = not locked, l = hard locked, s = soft locked table 25: security lock options level security lock bits 1,2 1. p = programmed (bit logic state = 0), u = unprogrammed (bit logic state = 1). 2. sfst[7:5] = security lock status bits (sb1_i, sb2_i, sb3_i) security status of: security type sfst[7:5] sb1 sb2 1 sb3 1 block 1 block 0 1 000 u u u unlock unlock no security features are enabled. 2 100 p u u softlock softlock movc instructions executed from external program memory are disabled from fetching code bytes from internal memory, ea# is sampled and latched on reset, and further programming of the flash is disabled. 3 011 101 u p p u p p hard lock hard lock level 2 plus verify disabled, both blocks locked. 010 u p u softlock softlock level 2 plus verify disabled. code in block 1 may program block 0 and vice versa. 110 001 p u p u u p hard lock softlock level 2 plus verify disabled. code in block 1 may program block 0. 4 111 p p p hard lock hard lock same as level 3 hard lock/hard lock, but mcu will start code exe- cution from the internal memory regardless of ea#. t0-0.0 25093 level 1 level 2 level 3 level 4 uuu/nn puu/ss upp/ll ppu/ls upu/ss ppp/ll 1273 f26.0 pup/ll upp/ll uup/ls
?2013 silicon storage technology, inc. ds25093b 02/13 63 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet read operation under lock condition the status of security bits sb1, sb2, and sb3 can be read when the read command is disabled by security lock. there are three ways to read the status. 1. external host mode: read-back = 00h (locked) 2. iap command: read-back = previous sfdt data 3. movc: read-back = ffh (blank) table 26: security lock access table level sfst[7:5] source address 1 target address 2 byte-verify allowed movc allowed external host 3 iap 516rdx 4 111b (hard lock on both blocks) block 0/1 block 0/1 n n y external n/a n/a n external block 0/1 n n n external n/a n/a n 3 011b/101b (hard lock on both blocks) block 0/1 block 0/1 n n y external n/a n/a n external block 0/1 n n n external n/a n/a y 001b/110b (block 0 = softlock, block 1 = hard lock) block 0 block 0 n n y block 1 n n n external n/a n/a n block 1 block 0 n y y block 1 n n y external n/a n/a n external block 0/1 n n n external n/a n/a y 010b (softlock on both blocks) block 0 block 0 n n y block 1 n y y external n/a n/a n block 1 block 0 n y y block 1 n n y external n/a n/a n external block 0/1 n n n external n/a n/a y 2 100b (softlock on both blocks) block 0 block 0 y n y block 1 y y y external n/a n/a n block 1 block 0 y y y block 1 y n y external n/a n/a n external block 0/1 y n n external n/a n/a y
?2013 silicon storage technology, inc. ds25093b 02/13 64 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet 1 000b (unlock) block 0 block 0 y n y block 1 y y y external n/a n/a n block 1 block 0 y y y block 1 y n y external n/a n/a n external block 0/1 y y n external n/a n/a y t0-0.0 25093 1. location of movc or iap instruction 2. target address is the location of the byte being read 3. external host byte-verify acce ss does not depend on a source address. table 26: security lock access table level sfst[7:5] source address 1 target address 2 byte-verify allowed movc allowed external host 3 iap 516rdx
?2013 silicon storage technology, inc. ds25093b 02/13 65 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet reset a system reset initializes the mcu and begins program execution at program memory location 0000h. the reset input for the device is the rst pin. in order to reset the device, a logic level high must be applied to the rst pin for at least two machine cycl es (24 clocks), after the oscillator becomes stable. ale, psen# are weakly pulled high du ring reset. during reset, ale and psen# output a high level in order to perform a proper reset. this level must not be affected by external element. a system reset will not affect the 1 kbyte of on-chip ram while the device is running, however, the contents of the on-chip ram during power up are indeterminate. following reset, all special function registers (sfr) return to their reset values outlined in tables 6 to 10. power-on reset at initial power up, the port pins will be in a random state until the oscillator ha s started and the internal reset algorithm has weakly pulled all pins high. powering up the device without a valid reset could cause the mcu to start executing instructions fr om an indeterminate location. such undefined states may inadvertently corrupt the code in the flash. when power is applied to the device, the rst pin must be held high long enough for the oscillator to start up (usu- ally several milliseconds for a low frequency crystal), in addition to two machine cycles for a valid power-on reset. an example of a method to extend the rst signal is to implement a rc circuit by connecting the rst pin to v dd through a 10 f capacitor and to v ss through an 8.2k resistor as shown in figure 31. note that if an rc circuit is being used, provisions should be made to ensure the v dd rise time does not exceed 1 millisecond and the oscillator start-up time does not exceed 10 milliseconds. for a low frequency oscillator with slow start-up time the reset signal must be extended in order to account for the slow start-up time. this method maintains the necessary relationship between v dd and rst to avoid programming at an indeterminate location, which may cause corruption in the code of the flash. the power-on detection is designed to work as power up initially, before the voltage reaches the brown-out detection level. the pof flag in the pcon register is set to indicate an initial power up con- dition. the pof flag will remain acti ve until cleared by software. please see section , ?power control register (pcon)? on page 31 for detailed information. for more information on system level design techniques, please review the flashflex mcu: oscilla- tor circuit design considerations application note. figure 31: power-on reset circuit 1273 f27.0 v dd v dd 10f + - 8.2k sst89e/v516rdx rst xtal2 xtal1 c 1 c 2
?2013 silicon storage technology, inc. ds25093b 02/13 66 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet software reset the software reset is executed by changing sfcf[1] (swr) from ?0? to ?1?. a software reset will reset the program counter to address 0000h. all sfr r egisters will be set to their reset values, except sfcf[1] (swr), wdtc[2] (wdts), and ram data will not be altered. brown-out detection reset the device includes a brown-out detection circuit to protect the system from severed supplied voltage v dd fluctuations. sst89e516rdx internal brown-out detection threshold is 3.85v, SST89V516RDx brown-out detection threshold is 2.35v. for brown-out voltage parameters, please refer to table 36. when v dd drops below this voltage threshold, the brown-out detector triggers the circuit to generate a brown-out interrupt but the cpu still runs until the supplied voltage returns to the brown-out detection voltage v bod . the default operation for a brown-out detection is to cause a processor reset. v dd must stay below v bod at least four oscillator clock periods before the brown-out detection circuit will respond. brown-out interrupt can be enabled by setting the ebo bit in iea register (address e8h, bit 3). if ebo bit is set and a brown-out conditio n occurs, a brown-out interrupt will be generated to execute the pro- gram at location 004bh. it is required that the ebo bit be cleared by software after the brown-out inter- rupt is serviced. clearing ebo bit when the brown-out condition is active will properly reset the device. if brown-out interrupt is not enabled, a brown-out condition will re set the program to resume execution at location 0000h.
?2013 silicon storage technology, inc. ds25093b 02/13 67 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet interrupts interrupt priority and polling sequence the device supports eight interrupt sources under a four level priority scheme. table 27 summarizes the polling sequence of the supported interrupts. note that the spi serial interface and the uart share the same interrupt vector. (see figure 32) table 27: interrupt polling sequence description interrupt flag vector address interrupt enable interrupt priority service priority wake-up power-down ext. int0 ie0 0003h ex0 px0/h 1(highest) yes brown-out - 004bh ebo pbo/h 2 no t0 tf0 000bh et0 pt0/h 3 no ext. int1 ie1 0013h ex1 px1/h 4 yes t1 tf1 001bh et1 pt1/h 5 no pca cf/ccfn 0033h ec ppch 6 no ext. int. 2 ie2 003bh ex2 px2/h 7 no ext. int. 3 ie3 0043h ex3 px3/h 8 no uart/spi ti/ri/spif 0023h es ps/h 9 no t2 tf2, exf2 002bh et2 pt2/h 10 no t0-0.0 25093
?2013 silicon storage technology, inc. ds25093b 02/13 68 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet figure 32: interrupt structure interrupt polling sequence ie1 int1# individual enables tf1 tf0 ri 0 1 ie0 global disable highest priority interrupt lowest priority interrupt it0 it1 int0# ie & iea registers ip/iph/ipa/ipah registers 0 1 tf2 exf2 1273 f28.0 ti spie spif bof cf ecf ccfn eccfn ie2 it2 int2# 0 1 ie3 it3 int3# 0 1
?2013 silicon storage technology, inc. ds25093b 02/13 69 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet power-saving modes the device provides two power saving modes of operation for applications where power consumption is critical. the two modes are idle and power-down, see table 28. idle mode idle mode is entered setting the idl bit in the pcon register. in idle mode, the program counter (pc) is stopped. the system clock continues to run and all interrupts and peripherals remain active. the on- chip ram and the special function registers hold their data during this mode. the device exits idle mode through either a system interrupt or a hardware reset. exiting idle mode via system interrupt, the start of the interrupt clears the idl bit and exits idle mode. after exit the interrupt service routine, the interrupted program resumes execution beginning at the instruction immediately following the instruction which invoked the idle mode. a hardware reset starts the device similar to a power-on reset. power-down mode the power-down mode is entered by setting the pd bit in the pcon register. in the power-down mode, the clock is stopped and external interrupts are active for level sensitive interrupts only. sram contents are retained during power-down, the minimum v dd level is 2.0v. the device exits power-down mode through either an enabled external level sensitive interrupt or a hardware reset. the start of the interrupt clears the pd bit and exits power-down. holding the external interrupt pin low restarts the oscilla tor, the signal must hold low at least 1024 clock cycl es before bring- ing back high to complete the exit. upon interrupt signal being restored to logic v ih, the first instruction of the interrupt service r outine will execute. a hardware reset st arts the device similar to power-on reset. to exit properly out of power-down, the reset or external interrupt should not be executed before the v dd line is restored to its normal operating voltage. be sure to hold v dd voltage long enough at its nor- mal operating level for the oscillator to re start and stabilize (normally less than 10 ms).
?2013 silicon storage technology, inc. ds25093b 02/13 70 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet table 28: power saving modes mode initiated by state of mcu exited by idle mode software (set idl bit in pcon) mov pcon, #01h; clk is running. interrupts, serial port and timers/counters are active. program counter is stopped. ale and psen# signals at a high level during idle. all registers remain unchanged. enabled interrupt or hardware reset. start of interrupt clears idl bit and exits idle mode, after the isr reti instruction, program resumes execution beginning at the instruction following the one that invoked idle mode. a user could consider placing two or three nop instructions after the instruc- tion that invokes idle mode to elim- inate any problems. a hardware reset restarts the device similar to a power-on reset. power-down mode software (set pd bit in pcon) mov pcon, #02h; clk is stopped. on-chip sram and sfr data is maintained. ale and psen# signals at a low level during power -down. external interrupts are only active for level sensi- tive interrupts, if enabled. enabled external level sensitive interrupt or hardware reset. start of interrupt clears pd bit and exits power-down mode, after the isr reti instruction program resumes execution beginning at the instruc- tion following the one that invoked power-down mode. a user could consider placing two or three nop instructions after the instruction that invokes power-down mode to eliminate any problems. a hard- ware reset restarts the device sim- ilar to a power-on reset. t0-0.0 25093
?2013 silicon storage technology, inc. ds25093b 02/13 71 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet system clock and clock options clock input options and recommende d capacitor values for oscillator shown in figure 33 are the input and output of an internal inverting amplifier (xtal1, xtal2), which can be configured for us e as an on-chip oscillator. when driving the device from an external clock source, xtal2 should be left disconnected and xtal1 should be driven. at start-up, the external oscillator may encounter a higher capacitive load at xtal1 due to interaction between the amplifier and its feed back capacitance. however, the capacitance will not exceed 15 pf once the external signal meets the v il and v ih specifications. crystal manufacturer, supply voltage, and other factors may cause circuit performance to differ from one application to another. c1 and c2 should be adjusted appropriately for each design. table 29, shows the typical values for c1 and c2 vs. crystal type for various frequencies more specific information about on-chip oscillator design ca n be found in the flashflex oscillator circuit design considerations application note. clock doubling option by default, the device runs at 12 clocks per machine cycle (x1 mode). the device has a clock doubling option to speed up to 6 clocks per machine cycle. please refer to table 30 for detail. clock double mode can be enabled either via the external host mode or the iap mode. please refer to table 14 for the iap mode enabling commands (when se t, the edc# bit in sfst register will indicate 6 clock mode.). the clock double mode is only for doubling the internal system clock and the internal flash memory, i.e. ea#=1. to access the external memory and the peripheral devices, careful consideration must be taken. also note that the cryst al output (xtal2) will not be doubled. table 29: recommended values for c1 and c2 by crystal type crystal c1 = c2 quartz 20-30pf ceramic 40-50pf t0-0.0 25093
?2013 silicon storage technology, inc. ds25093b 02/13 72 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet figure 33: oscillator characteristics table 30: clock doubling features device standard mode (x1) clock double mode (x2) clocks per machine cycle max. external clock frequency (mhz) clocks per machine cycle max. external clock frequency (mhz) sst89e516rdx 12 40 6 20 SST89V516RDx 12 33 6 16 t0-0.0 25093 1273 f29.0 xtal2 xtal1 v ss c 1 using the on-chip oscillator external clock drive c 2 xtal2 xtal1 v ss external oscillator signal nc
?2013 silicon storage technology, inc. ds25093b 02/13 73 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet electrical specification note: this specification contains preliminary information on new products in production. the specifications are subj ect to change without notice. absolute maximum stress ratings (applied conditions greater than those listed under ?absolute maximum stress ratings? may cause permanent damage to the device. this is a stress rating only and functional operation of the device at these conditions or conditions greater than those defined in the operational sections of this data sheet is not implied. exposure to absolute maximum stress rating con- ditions may affect device reliability.) ambient temperature under bias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -55c to +125c storage temperature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -65c to + 150c voltage on ea# pin to v ss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -0.5v to +14.0v d.c. voltage on any pin to ground potential . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -0.5v to v dd +0.5v transient voltage (<20ns) on any other pin to v ss . . . . . . . . . . . . . . . . . . . . . . . . . -1.0v to v dd +1.0v maximum i ol per i/o pins p1.5, p1.6, p1.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20ma maximum i ol per i/o for all other pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15ma package power dissipation capability (t a = 25c) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.5w through hole lead soldering temperature (10 seconds) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .300c surface mount solder reflow temperature 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 260c for 10 seconds 1. excluding certain with-pb 32- plcc units, all packages are 260 c capable in both non-pb and with-pb solder versions. certain with-pb 32-plcc package types are capable of 240 c for 10 seconds; please consult the factory for the latest information. output short circuit current 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 ma 2. outputs shorted for no more than one second. no more than one output shorted at a time. (based on package heat transfer limitations, not device power consumption. table 31: operating range symbol description min. max unit t a ambient temperature under bias standard 0 +70 c industrial -40 +85 c v dd supply voltage sst89e516rdx 4.5 5.5 v SST89V516RDx 2.7 3.6 v f osc oscillator frequency sst89e516rdx 0 40 mhz SST89V516RDx 0 33 mhz oscillator frequency for iap sst89e516rdx .25 40 mhz SST89V516RDx .25 33 mhz t0-0.0 25093
?2013 silicon storage technology, inc. ds25093b 02/13 74 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet table 32: reliability characteristics symbol parameter minimum sp ecification units test method n end 1 endurance 10,000 cycles jedec standard a117 t dr 1 data retention 100 years jedec standard a103 i lt h 1 latch up 100 + i dd ma jedec standard 78 t0-0.0 25093 1. this parameter is measured only for initial qualification and after a desig n or process change that could affect this parameter. table 33: ac conditions of test 1 1. see figures 41 and 43 input rise/fall time output load 10 ns c l = 100 pf t33.1 25093 table 34: recommended system power-up timings symbol parameter minimum units t pu-read 1 1. this parameter is measured only for initial qualification and after a desig n or process change that could affect this parameter power-up to read operation 100 s t pu-write 1 power-up to write operation 100 s t0-0.0 25093 table 35: pin impedance (v dd =3.3v, t a =25c, f=1 mhz, other pins open) parameter description test condition maximum c i/o 1 1. this parameter is measured only for initial qualification and after a desig n or process change that could affect this parameter. i/o pin capacitance v i/o = 0v 15 pf c in 1 input capacitance v in = 0v 12 pf l pin 2 2. refer to pci spec. pin inductance 20 nh t0-0.0 25093
?2013 silicon storage technology, inc. ds25093b 02/13 75 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet dc electrical characteristics table 36: dc electrical characteristics for sst89e516rdx t a = -40c to +85c; v dd = 4.5-5.5v; v ss = 0v symbol parameter test conditions min max units v il input low voltage 4.5 < v dd < 5.5 -0.5 0.2v dd - 0.1 v v ih input high voltage 4.5 < v dd < 5.5 0.2v dd + 0.9 v dd + 0.5 v v ih1 input high voltage (xtal1, rst) 4.5 < v dd < 5.5 0.7v dd v dd + 0.5 v v ol output low voltage (ports 1.5, 1.6, 1.7) v dd = 4.5v i ol = 16ma 1.0 v v ol output low voltage (ports 1, 2, 3) 1 v dd = 4.5v i ol = 100a 2 0.3 v i ol = 1.6ma 2 0.45 v i ol = 3.5ma 2 1.0 v v ol1 output low voltage (port 0, ale, psen#) 1,3 v dd = 4.5v i ol = 200a 2 0.3 v i ol = 3.2ma 2 0.45 v v oh output high voltage (ports 1, 2, 3, ale, psen#) 4 v dd = 4.5v i oh = -10a v dd - 0.3 v i oh = -30a v dd - 0.7 v i oh = -60a v dd - 1.5 v v oh1 output high voltage (port 0 in external bus mode) 4 v dd = 4.5v i oh = -200a v dd - 0.3 v i oh = -3.2ma v dd - 0.7 v v bod brown-out detection voltage 3.85 4.15 v i il logical 0 input current (ports 1, 2, 3) v in = 0.4v -75 a i tl logical 1-to-0 transition current (ports 1, 2, 3) 5 v in = 2v -650 a i li input leakage current (port 0) 0.45 < v in < v dd -0.3 10 a r rst rst pull-down resistor 40 225 k c io pin capacitance 6 @ 1 mhz, 25c 15 pf i dd power supply current iap mode @ 40 mhz 88 ma active mode @ 40 mhz 50 ma idle mode @ 40 mhz 42 ma power-down mode (min. v dd = 2v) t a = 0c to +70c 80 a t a = -40c to +85c 90 a t0-0.1 25093
?2013 silicon storage technology, inc. ds25093b 02/13 76 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet 1. under steady state (non-transient) conditions, i ol must be externally limited as follows: maximum i ol per port pin: 15ma maximum i ol per 8-bit port: 26ma maximum i ol total for all outputs:71ma if i ol exceeds the test condition, v ol may exceed the related specification. pins are not guaranteed to sink current greater than the listed test conditions. 2. capacitive loading on ports 0 and 2 may cause spurious noise to be superimposed on the v ol s of ale and ports 1 & 3. the noise due to external bus capacitance discharging into the port 0 & 2 pins when the pins make 1-to-0 transitions during bus operations. in the worst cases (capacitive loading > 100pf), the noise pulse on the ale pin may exceed 0.8v. in such cases, it may be desirable to qualify ale with a schmitt trigger, or use an address latch with a schmitt trigger strobe input. 3. load capacitance for port 0, ale & psen#= 100pf, load capacitance for all other outputs = 80pf. 4. capacitive loading on ports 0 and 2 may cause the v oh on ale and psen# to momentarily fall below the v dd - 0.7 specification when the addr ess bits are stabilizing. 5. pins of ports 1, 2, and 3 source a tr ansition current when they are being externa lly driven from 1 to 0. the transition cur- rent reaches its maximum value when v in is approximately 2v. 6. pin capacitance is characterized but not tested. ea# is 25pf (max).
?2013 silicon storage technology, inc. ds25093b 02/13 77 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet table 37: dc electrical characteristics for SST89V516RDx t a = -40c to +85c; v dd = 2.7-3.6v; v ss = 0v symbo l parameter test conditions min max unit s v il input low voltage 2.7 < v dd < 3.6 -0.5 0.7 v v ih input high voltage 2.7 < v dd < 3.6 0.2v dd + 0.9 v dd + 0.5 v v ih1 input high voltage (xtal1, rst) 2.7 < v dd < 3.6 0.7v dd v dd + 0.5 v v ol output low voltage (ports 1.5, 1.6, 1.7) v dd = 2.7v i ol = 16ma 1.0 v v ol output low voltage (ports 1, 2, 3) 1 v dd = 2.7v i ol = 100a 2 0.3 v i ol = 1.6ma 2 0.45 v i ol = 3.5ma 2 1.0 v v ol1 output low voltage (port 0, ale, psen#) 1,3 v dd = 2.7v i ol = 200a 2 0.3 v i ol = 3.2ma 2 0.45 v v oh output high voltage (ports 1, 2, 3, ale, psen#) 4 v dd = 2.7v i oh = -10a v dd - 0.3 v i oh = -30a v dd - 0.7 v i oh = -60a v dd - 1.5 v v oh1 output high voltage (port 0 in external bus mode) 4 v dd = 2.7v i oh = -200a v dd - 0.3 v i oh = -3.2ma v dd - 0.7 v v bod brown-out detection voltage 2.35 2.55 v i il logical 0 input current (ports 1, 2, 3) v in = 0.4v -75 a i tl logical 1-to-0 transition current (ports 1, 2, 3) 5 v in = 2v -650 a i li input leakage current (port 0) 0.45 < v in < v dd -0.3 10 a r rst rst pull-down resistor 225 k c io pin capacitance 6 @ 1 mhz, 25c 15 pf i dd power supply current iap mode @ 33 mhz 47 ma active mode @ 33 mhz 30 ma idle mode @ 33 mhz 21 ma power-down mode (min. v dd = 2v) t a = 0c to +70c 45 a t a = -40c to +85c 55 a t0-0.1 25093
?2013 silicon storage technology, inc. ds25093b 02/13 78 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet 1. under steady state (non-transient) conditions, i ol must be externally limited as follows: maximum i ol per port pin: 15ma maximum i ol per 8-bit port: 26ma maximum i ol total for all outputs: 71ma if i ol exceeds the test condition, v ol may exceed the related specification. pins are not guaranteed to sink current greater than the listed test conditions. 2. capacitive loading on ports 0 and 2 may cause s purious noise to be superimposed on the v ol s of ale and ports 1 & 3. the noise due to external bus capacitance discharging into the port 0 & 2 pins when the pins make 1-to-0 transitions during bus operations. in the worst cases (capacitive loading > 100pf), the noise pulse on the ale pin may exceed 0.8v. in such cases, it may be desirable to qualify ale with a schmitt trigger, or use an address latch with a schmitt trigger strobe input. 3. load capacitance for port 0, ale & psen#= 100pf, load capacitance for all other outputs = 80pf. 4. capacitive loading on ports 0 & 2 may cause the v oh on ale and psen# to momentarily fall below the v dd - 0.7 spec- ification when the address bits are stabilizing. 5. pins of ports 1, 2, and 3 source a transition current when th ey are being externally driven from 1 to 0. the transition cur- rent reaches its maximum value when v in is approximately 2v. 6. pin capacitance is characterized but not tested. ea# is 25pf (max).
?2013 silicon storage technology, inc. ds25093b 02/13 79 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet figure 34: i dd vs. frequency for 3v SST89V516RDx figure 35: i dd vs. frequency for 5v sst89e516rdx 30 25 20 15 10 5 0 5101520253035 i dd (ma) internal clock frequency (mhz) maximum idle i dd typical idle i dd maximum active i dd typical active i dd 1273 f30.0 50 40 30 20 10 0 510152025303540 i dd (ma) internal clock frequency (mhz) 1273 f31.0 maximum idle i dd typical idle i dd maximum active i dd typical active i dd
?2013 silicon storage technology, inc. ds25093b 02/13 80 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet ac electrical characteristics ac characteristics: (over operating conditions: load capacitance for port 0, ale#, and psen# = 100pf; load capacitance for all other outputs = 80pf) table 38: ac electrical characteristics (1 of 2) t a = -40c to +85c, v dd = 2.7-3.6v@33mhz, 4.5-5.5v@40mhz, v ss = 0v symbol parameter oscillator units 33 mhz (x1 mode) 16 mhz (x2 mode) 1 40 mhz (x1 mode) 20 mhz (x2 mode) 1 variable min max min max min max 1/t clcl x1 mode oscillator fre- quency 033040 0 40 mhz 1/2t clcl x2 mode oscillator fre- quency 016020 0 20 mhz t lhll ale pulse width 46 35 2t clcl - 15 ns t avll address valid to ale low 5t clcl - 25 (3v) ns 10 t clcl - 15 (5v) ns t llax address hold after ale low 5t clcl - 25 (3v) ns 10 t clcl - 15 (5v) ns t lliv ale low to valid instr in 56 4t clcl - 65 (3v) ns 55 4t clcl - 45 (5v) ns t llpl ale low to psen# low 5t clcl - 25 (3v) ns 10 t clcl - 15 (5v) ns t plph psen# pulse width 66 60 3t clcl - 25 (3v) 3t clcl - 15 (5v) ns t pliv psen# low to valid instr in 35 3t clcl - 55 (3v) ns 25 3t clcl - 50 (5v) ns t pxix input instr hold after psen# 0n s t pxiz input instr float after psen# 25 t clcl - 5 (3v) ns 10 t clcl - 15 (5v) ns t pxav psen# to address valid 22 17 t clcl - 8 ns t aviv address to valid instr in 72 5t clcl - 80 (3v) ns 65 5t clcl - 60 (5v) ns t plaz psen# low to address float 10 10 10 ns t rlrh rd# pulse width 142 120 6t clcl - 40 (3v) 6t clcl - 30 (5v) ns t wlwh write pulse width (we#) 142 120 6t clcl - 40 (3v) 6t clcl - 30 (5v) ns t rldv rd# low to valid data in 62 5t clcl - 90 (3v) ns
?2013 silicon storage technology, inc. ds25093b 02/13 81 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet 75 5t clcl - 50 (5v) ns t rhdx data hold after rd# 00 0 n s t rhdz data float after rd# 36 2t clcl - 25 (3v) ns 38 2t clcl - 12 (5v) ns t lldv ale low to valid data in 152 8t clcl - 90 (3v) ns 150 8t clcl - 50 (5v) ns t avdv address to valid data in 183 9t clcl - 90 (3v) ns 150 9t clcl - 75 (5v) ns t llwl ale low to rd# or wr# low 66 116 60 90 3t clcl - 25 (3v) 3t clcl - 15 (5v) 3t clcl + 25 (3v) 3t clcl + 15 (5v) ns t avwl address to rd# or wr# low 46 4t clcl - 75 (3v) ns 70 4t clcl - 30 (5v) ns t whqx data hold after wr# 3t clcl - 27 (3v) ns 5t clcl - 20 (5v) ns t qvwh data valid to wr# high 142 7t clcl - 70 (3v) ns 125 7t clcl - 50 (5v) ns t qvwx data valid to wr# high to low transition 10 5 t clcl - 20 ns t rlaz rd# low to address float 0 0 0 ns t whlh rd# to wr# high to ale high 555 t clcl - 25 (3v) t clcl + 25 (3v) ns 10 40 t clcl - 15 (5v) t clcl + 15 (5v) ns t0-0.0 25093 1. calculated values are for x1 mode only table 38: ac electrical characteristics (continued) (2 of 2) t a = -40c to +85c, v dd = 2.7-3.6v@33mhz, 4.5-5.5v@40mhz, v ss = 0v symbol parameter oscillator units 33 mhz (x1 mode) 16 mhz (x2 mode) 1 40 mhz (x1 mode) 20 mhz (x2 mode) 1 variable min max min max min max
?2013 silicon storage technology, inc. ds25093b 02/13 82 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet explanation of symbols each timing symbol has 5 characters. the first character is always a ?t? (stands for time). the other characters, depending on their positions, stand for the name of a signal or the logical status of that sig- nal. the following is a list of all the characters and what they stand for. for example: t avll = time from address valid to ale low t llpl = time from ale low to psen# low a: address q: output data c: clock r: rd# signal d: input data t: time h: logic level high v: valid i: instruction (program memory contents) w: wr# signal l: logic level low or ale x: no longer a valid logic level p: psen# z: high impe dance (float)
?2013 silicon storage technology, inc. ds25093b 02/13 83 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet figure 36: external program memory read cycle figure 37: external data memory read cycle 1273 f32.0 port 2 port 0 psen# ale a0 - a7 t llax t plaz t pxiz t llpl t aviv t avll t pxix t lhll t lliv t pliv t plph instr in a8 - a15 a8 - a15 a0 - a7 t pxav 1273 f33.0 port 2 port 0 rd# psen# ale t lhll p2[7:0] or a8-a15 from dph a0-a7 from ri or dpl t avdv t avwl data in instr in t rlaz t avll t llax t llwl t lldv t rlrh t rldv t rhdz t whlh t rhdx a8-a15 from pch a0-a7 from pcl
?2013 silicon storage technology, inc. ds25093b 02/13 84 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet figure 38: external data memory write cycle figure 39: external clock drive waveform table 39: external clock drive symbol parameter oscillator units 12mhz 40mhz variable min max min max min max 1/t clcl oscillator frequency 0 40 mhz t clcl 83 25 ns t chcx high time 8.75 0.35t clcl 0.65t clcl ns t clcx low time 8.75 0.35t clcl 0.65t clcl ns t clch rise time 20 10 ns t chcl fall time 20 10 ns t0-0.0 25093 1273 f34.0 port 2 port 0 wr# psen# ale t lhll p2[7:0] or a8-a15 from dph a0-a7 from ri or dpl data out instr in t avll t avwl t llwl t llax t wlwh t qvwh t whqx t qvwx t whlh a8-a15 from pch a0-a7 from pcl 0.2 v dd - 0.1 0.45 v t chcl t clcl t clch t clcx t chcx 0.7v dd v dd - 0.5 1273 f35.0
?2013 silicon storage technology, inc. ds25093b 02/13 85 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet figure 40: shift register mode timing waveforms figure 41: ac testing input/output test waveform table 40: serial port timing symbol parameter oscillator units 12mhz 40mhz variable min max min max min max t xlxl serial port clock cycle time 1.0 0.3 12t clcl s t qvxh output data setup to clock rising edge 700 117 10t clcl - 133 ns t xhqx output data hold after clock ris- ing edge 50 2t clcl - 117 ns 02 t clcl - 50 ns t xhdx input data hold after clock rising edge 00 0 ns t xhdv clock rising edge to input data valid 700 117 10t clcl - 133 ns t0-0.0 25093 1273 f36.0 ale 0 instruction clock output data write to sbuf valid valid valid valid valid valid valid valid input data clear ri 01 2 34 567 t xlxl t qvxh t xhqx t xhdv t xhdx set ti set r i 1 2 3 4 5 6 7 8 v lt ac inputs during testing are driven at v iht (v dd -0.5v) for logic "1" and v ilt (0.45v) for a logic "0". measurement reference points for inputs and outputs are at v ht (0.2v dd + 0.9) and v lt (0.2v dd - 0.1) v ht v iht v ilt 1273 f37.0 note: v ht - v high test v lt - v low test v iht -v input high test v ilt - v input low test
?2013 silicon storage technology, inc. ds25093b 02/13 86 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet figure 42: float waveform figure 43: a test load example figure 44: i dd test condition, active mode for timing purposes, a port pin is no longer floating when a 100 mv change from load voltage occurs, and begins to float when a 100 mv change from the loaded v oh /v ol level occurs. i ol /i oh = 20ma. v load +0.1v v load -0.1v v oh -0.1v timing reference points v ol +0.1v v load 1273 f38.0 1273 f39.0 to tester to dut c l v dd v dd v dd v dd p0 ea# rst xtal2 (nc) clock signal all other pins disconnected sst89x516rdx xtal1 1273 f40.0 v ss i dd
?2013 silicon storage technology, inc. ds25093b 02/13 87 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet figure 45: i dd test condition, idle mode figure 46: i dd test condition, power-down mode table 41: flash memory programming/verification parameters 1 1. for iap operations, the program execution overhead must be added to the above timing parameters. parameter 2 2. program and erase times will scale invers ely proportional to programming clock frequency. max units chip-erase time 150 ms block-erase time 100 ms sector-erase time 30 ms byte-program time 3 3. each byte must be erased before programming. 50 s select-block program time 500 ns re-map or security bit program time 80 s t0-0.1 25093 v dd v dd v dd p0 ea# rst xtal2 (nc) clock signal all other pins disconnected xtal1 1273 f41.0 v ss i dd sst89x516rdx v dd v dd v dd p0 ea# rst xtal2 (nc) all other pins disconnected xtal1 1273 f42.0 v ss i dd sst89x5xxrdx
?2013 silicon storage technology, inc. ds25093b 02/13 88 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet product ordering information sst 89 e 516rd2 - 33 - c - tqje xx xx xxxxxx -xx -x - xxxx environmental attribute e 1 = non-pb f 1 = non-pb / non-sn contact finish package modifier i = 40 pins j = 44 pins package type p = pdip n = plcc q = wqfn tq = tqfp operation temperature c = commercial = 0c to +70c i = industrial = -40c to +85c operating frequency 33 = 0-33mhz 40 = 0-40mhz feature attribute 2 = port 4 present feature set and flash memory size 516rd = c52 feature set + 64(72) kbyte note: number in parenthesis includes an addi- tional 8 kbyte flash which can be enabled. voltag e rang e e = 4.5-5.5v v = 2.7-3.6v product series 89 = c51 core 1. environmental suffix ?e? denotes non-pb sol- der. environmental suffix ?f? denote non-pb /non-sn solder. sst non-pb / non-sn solder devices are ?rohs compliant?.
?2013 silicon storage technology, inc. ds25093b 02/13 89 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet valid combinations note: valid combinations are those products in mass producti on or will be in mass production. consult your sst sales representative to confirm availability of valid co mbinations and to determine availability of new combi- nations. valid combinations for sst89e516rd2 sst89e516rd2-40-c-nje sst89e516rd2-40-c-tqje sst89e516rd2-40-i-nje sst89e516rd2-40-i-tqje valid combinations for SST89V516RD2 SST89V516RD2-33-c-nje SST89V516RD2-33-c-tqje SST89V516RD2-33-i-nje SST89V516RD2-33-i-tqje valid combinations for sst89e516rd sst89e516rd-40-c-pie sst89e516rd-40-c-qif sst89e516rd-40-i-qif valid combinations for SST89V516RD SST89V516RD-33-c-pie SST89V516RD-33-c-qif SST89V516RD-33-i-qif
?2013 silicon storage technology, inc. ds25093b 02/13 90 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet packaging diagrams figure 47: 40-contact very-very-thin quad flat no-lead (wqfn) sst package code: qi note: 1. complies with jedec jep95 mo-220i, variant wjjd-5 except external paddle nominal dimensions. 2. from the bottom view, the pin #1 indicator may be either a 45-degree chamfer or a half-circle notch. 3. the external paddle is electrically connected to the die back-side and possibly to certain v ss leads. this paddle should be soldered to the pc board; it is suggested to connect this paddle to the v ss of the unit. connection of this paddle to any other voltage potential will result in shorts and/or electrical malfunction of the device. 4. untoleranced dimensions are nominal target dimensions. 5. all linear dimensions are in millimeters (max/min). 40-wqfn-6x6-qi-1 4.1 0.5 bsc see notes 2 and 3 pin #1 0.30 0.18 0.075 4.1 0.2 6.00 0.10 6.00 0.10 0.05 max 0.45 0.35 0.80 0.70 pin #1 top view bottom view side view 1mm
?2013 silicon storage technology, inc. ds25093b 02/13 91 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet figure 48: 40-pin plastic dual in-line pins (pdip) sst package code: pi 40-pdip-pi-7 pin #1 identifier c l 40 1 base plane seating plane .220 max. 12 4 places .600 bsc .100 bsc .100 ? .200 .015 .022 .045 .055 .063 .090 .015 min. .065 .075 2.020 2.070 .008 .012 0 15 .600 .625 .530 .557 note: 1. complies with jedec publication 95 ms-011 ac dimensions (except as noted), although some dimensions may be more stringent. ? = jedec min is .115; sst min is less stringent 2. all linear dimensions are in inches (min/max). 3. dimensions do not include mold flash. maximum allowable mold flash is .010 inches.
?2013 silicon storage technology, inc. ds25093b 02/13 92 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet figure 49: 44-lead plastic lead chip carrier (plcc) sst package code: nj .025 .045 .013 .021 .590 .630 .100 .112 .020 min. .165 .180 top view side view bottom view 144 .026 .032 .500 ref. 44.plcc.nj-ill.6 note: 1. complies with jedec publication 95 ms-018 ac dimensions (except as noted), although some dimensions may be more strin gent. ? = jedec min is .650; sst min is less stringent 2. all linear dimensions are in inches (min/max). 3. dimensions do not include mold flash. maximum allowable mold flash is .008 inches. 4. coplanarity: 4 mils. .050 bsc. .050 bsc. .026 .032 .042 .056 .646 ? .656 .042 .048 .042 .048 optional pin #1 identifier .646 ? .656 .685 .695 .685 .695 .020 r. max. .147 .158 r. x45
?2013 silicon storage technology, inc. ds25093b 02/13 93 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet figure 50: 44-lead thin quad flat pack (tqfp) sst package code: tqj note: 1. complies with jedec publication 95 ms-026 acb dimensions, although some dimensions may be more stringent. 2. all linear dimensions are in millimeters (min/max). 3. coplanarity: 0.1 (0.05) mm. 4. package body dimensions do not include mold flash. maximum allowable mold flash is .25mm. 44-tqfp-tqj-7 .45 .75 10.00 0.10 12.00 0.25 1.00 ref 0- 7 1 11 33 23 12 22 44 34 1.2 max. .95 1.05 .05 .15 pin #1 identifier .30 .45 .09 .20 .80 bsc 12.00 0.25 10.00 0.10 1mm
?2013 silicon storage technology, inc. ds25093b 02/13 94 flashflex mcu sst89e516rd2 / sst89e516rd SST89V516RD2 / SST89V516RD data sheet table 42: revision history revision description date 00 ? initial release of s71273 data sheet. sst89e/v516rd2 devices were previously released in s71255-00- 000 ? s71273 and s71273(01): added 40-wqfn (qi) package and associated mpns ? added sst89e/v516rd pdip devices and associated mpns ? clarified the solder temperature profile under ?absolute maximum stress ratings? on page 73 ? added rohs compliance information on page 1 and in the ?product ordering information? on page 88 ? removed references to external host mode programming ? corrected mpn breakdown definition for ?2? to read ?port 4 present? ? corrected the spi control register definition for cpha on page 30 mar 2005 01 ? status change from preliminary specifications to data sheet mar 2005 02 ? removed nj, tqj, and pi from valid combinations on page 78 ? removed valid combination sst89e516rd-40-i-pie and SST89V516RD-33-i-pie on page 78 oct 2006 03 ? replaced flashflex51 with flashflex globally jan 2007 a ? applied new document format ? released document under letter revision system ? updated spec number from s71273 to ds25093 nov 2011 b ? removed ?not recommended for new designs? statement on page 1. feb 2013 ? 2013 silicon storage technology, inc?a microchi p technology company. all rights reserved. sst, silicon storage technology, the sst l ogo, superflash, mtp, and flashflex are regi stered trademarks of silicon storage tech - nology, inc. mpf, sqi, serial quad i/o, and z-scale are trad emarks of silicon storage technology, inc. all other trademarks and registered trademarks mentioned herein are the property of their respective owners. specifications are subject to change without notice. refer to www.microchip.com for th e most recent documentation. for the most current package drawings, please see the packaging specific ation located at http://www.microchip.com/packaging. memory sizes denote raw storage capacity ; actual usable capacity may be less. sst makes no warranty for the use of its products other than those ex pressly contained in the standar d terms and conditions of sale. for sales office locations and information, please see www.microchip.com. silicon storage technology, inc. a microchip technology company www.microchip.com isbn: 978-1-62076-989-8


▲Up To Search▲   

 
Price & Availability of SST89V516RD

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X